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

sysctl --system #512

Open
drbree82 opened this issue Nov 28, 2023 · 2 comments · May be fixed by #544
Open

sysctl --system #512

drbree82 opened this issue Nov 28, 2023 · 2 comments · May be fixed by #544
Labels
has_pr verified This issue has been verified/reproduced by maintainer

Comments

@drbree82
Copy link

SUMMARY
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ansible.posix.sysctl

ADDITIONAL INFORMATION

running a shell command of

sysctl --system

can't be called using the module. Currently the only way to reload sysctl is to run

reload: yes

against every sysctl module.
Being able to do a general reload would be preferable to having to run shell or cmd calls.

- name: Reload sysctl config
  ansible.posix.sysctl:
    state: present
    reload: yes
@MubashirUsman
Copy link

Adding support for --system option would be useful as it will allow to reload configuration from other directories in the order below:
/etc/sysctl.d/*.conf
/run/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
/etc/sysctl.conf
Currently module does support -p option which acts upon the specified file or /etc/sysctl.conf if not given.

@saito-hideki saito-hideki added verified This issue has been verified/reproduced by maintainer has_pr labels Sep 26, 2024
@saito-hideki
Copy link
Collaborator

@drbree82 @MubashirUsman, In the current sysctl module, the name option is mandatory. Because the sysctl module is designed to set sysctl parameters for a single configuration file.
I think this enhancement is reasonable, but I believe your request is to perform a reload without specifying the name parameter, but in that case, we would need to make the name parameter optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr verified This issue has been verified/reproduced by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants