ansible-ferm
ansible-ferm copied to clipboard
Precise: Invalid parameter "sysctl --system"
Hi,
I am using the role in precise/pangolin ubuntu server. When try to execute this handler:
- name: Reload sysctl
command: sysctl --system
Throws an error, saying the '--system' parameter is invalid.
Cheking with the precise manual, it doesnt has the --system parameter. http://manpages.ubuntu.com/manpages/precise/man8/sysctl.8.html
I dont know the implications, but I change for the -p parameter and it works without errors.
It is ok to do this change?
Best Regards
@robertomatute Unfortunately, not. DebOps, and IIRC Ansible's sysctl
module configure their parameters in /etc/sysctl.d/
directory in separate files. Using sysctl -p
loads just contents of the /etc/sysctl.conf
file itself. As you can see from the same manual on Trusty, this option is present.
Since it's a handler I'm not sure if we can template --system/-p
directly, probably rather it would need two separate handlers to work. I will see if something can be done about that. Any chance for a backported package which should have --system
?
I dont know any backported package. I am working on Vagrant machines, so I dont have any problem using another sysctl package. Do you know anyone?
May be I can load the separated files with the -p option, passing the file names?
@robertomatute Unfortunately I think that there are no procps
packages backported to Ubuntu Precise which contain sysctl
with support for --system
option. Perhaps you could try adding Ubuntu Trusty repositories, and run:
apt-get -q update
apt-get --no-install-recommends install procps
See how many packages need to be upgraded to newer version.