Instead of running shell commands, use the sysctl module.
If possible, avoid using shell.
- sysctl:
    name: vm.swappiness
    value: '10'
    state: present
Instead of running shell commands, use the sysctl module.
If possible, avoid using shell.
- sysctl:
    name: vm.swappiness
    value: '10'
    state: present