Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precise: Invalid parameter "sysctl --system" #20

Open
robertomatute opened this issue Feb 5, 2015 · 3 comments
Open

Precise: Invalid parameter "sysctl --system" #20

robertomatute opened this issue Feb 5, 2015 · 3 comments

Comments

@robertomatute
Copy link

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

@drybjed
Copy link
Member

drybjed commented Feb 5, 2015

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

@robertomatute
Copy link
Author

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?

@drybjed
Copy link
Member

drybjed commented Feb 6, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants