mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-10 22:55:27 +01:00
Merge 385a562148 into 5f44339fa5
This commit is contained in:
commit
b6e9a79e94
1 changed files with 7 additions and 0 deletions
|
|
@ -418,6 +418,13 @@ def main():
|
|||
if module.params['state'] == 'present' and module.params['value'] == '':
|
||||
module.fail_json(msg="value cannot be blank")
|
||||
|
||||
# System specific tests
|
||||
system = platform.system().lower()
|
||||
if system == 'freebsd':
|
||||
if module.params['sysctl_file'] not in ['/etc/sysctl.conf', '/etc/sysctl.conf.local'] and \
|
||||
module.params['reload']:
|
||||
module.fail_json(msg="%s can not be reloaded. Set reload=False." % module.params['sysctl_file'])
|
||||
|
||||
result = SysctlModule(module)
|
||||
|
||||
module.exit_json(changed=result.changed)
|
||||
|
|
|
|||
Loading…
Reference in a new issue