ansible-ferm icon indicating copy to clipboard operation
ansible-ferm copied to clipboard

Precise: Invalid parameter "sysctl --system"

Open robertomatute opened this issue 10 years ago • 3 comments

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 avatar Feb 05 '15 17:02 robertomatute

@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?

drybjed avatar Feb 05 '15 17:02 drybjed

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 avatar Feb 05 '15 18:02 robertomatute

@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.

drybjed avatar Feb 06 '15 08:02 drybjed