From 498c8e8d5782cbffb77422e14b3967e4392f7a30 Mon Sep 17 00:00:00 2001 From: Dale Sedivec Date: Wed, 19 Feb 2014 20:38:21 -0600 Subject: [PATCH] Fix mistaken double backslash The module helper function run_command was appending a literal backslash followed by 'n' to the stdin of a command it runs unless you called it with binary_data=True (not the default). I have changed it to what I expect was the intent, to append an actual line feed to stdin. --- lib/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 3be407fe707..938595c5604 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1039,7 +1039,7 @@ class AnsibleModule(object): if data: if not binary_data: - data += '\\n' + data += '\n' out, err = cmd.communicate(input=data) rc = cmd.returncode except (OSError, IOError), e: