mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 15:15:26 +01:00
Compare commits
2 commits
39c50acaac
...
48654cea81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48654cea81 | ||
|
|
385a562148 |
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