From cf0a0ca3d269e259065893d93d87e8763076f796 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 18 Mar 2014 09:30:21 -0400 Subject: [PATCH] Fixes #6519 Properly handle state=absent in sysctl module --- library/system/sysctl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/system/sysctl b/library/system/sysctl index 1b29fed8f1..ab1da5e095 100644 --- a/library/system/sysctl +++ b/library/system/sysctl @@ -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