From 19cb22b6dfb1e26c0dadc0a090d37a5e60f01e66 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Thu, 16 Jan 2014 16:30:13 -0500 Subject: [PATCH] Fixes #5656 quote values with multiple columns before calling the sysctl command. Calling sysctl should also not be true by default --- library/system/sysctl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/system/sysctl b/library/system/sysctl index c16056937d7..407d36286dc 100644 --- a/library/system/sysctl +++ b/library/system/sysctl @@ -173,6 +173,8 @@ class SysctlModule(object): # Use the sysctl command to set the current value def set_token_value(self, token, value): + if len(value.split()) > 0: + value = '"' + value + '"' thiscmd = "%s -w %s=%s" % (self.sysctl_cmd, token, value) rc,out,err = self.module.run_command(thiscmd) if rc != 0: @@ -268,7 +270,7 @@ def main(): value = dict(aliases=['val'], required=False), state = dict(default='present', choices=['present', 'absent']), reload = dict(default=True, type='bool'), - sysctl_set = dict(default=True, type='bool'), + sysctl_set = dict(default=False, type='bool'), sysctl_file = dict(default='/etc/sysctl.conf') ), supports_check_mode=True