mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #6519 Properly handle state=absent in sysctl module
This commit is contained in:
parent
db3d2e1042
commit
cf0a0ca3d2
1 changed files with 4 additions and 0 deletions
|
@ -144,9 +144,13 @@ class SysctlModule(object):
|
|||
if self.file_values[thisname] is None and self.args['state'] == "present":
|
||||
self.changed = True
|
||||
self.write_file = True
|
||||
elif self.file_values[thisname] is None and self.args['state'] == "absent":
|
||||
self.changed = False
|
||||
elif self.file_values[thisname] != self.args['value']:
|
||||
self.changed = True
|
||||
self.write_file = True
|
||||
|
||||
# use the sysctl command or not?
|
||||
if self.args['sysctl_set']:
|
||||
if self.proc_value is None:
|
||||
self.changed = True
|
||||
|
|
Loading…
Reference in a new issue