This commit is contained in:
Vladimir Botka 2025-08-16 10:19:37 +02:00 committed by GitHub
commit 39c50acaac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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