ansible-collections / ansible.posix

Ansible Collection for Posix
Other
152 stars 149 forks source link

sysctl --system #512

Open drbree82 opened 9 months ago

drbree82 commented 9 months ago
SUMMARY
ISSUE TYPE
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 commented 3 months ago

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.