From 2ff3a8d35fd7a5dda704fdc8c9081f81933a661b Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 18 Mar 2015 23:33:33 -0500 Subject: [PATCH] Updated lxc_container module to fix option parsing The option parsing object within the module was performing a split on an '=' sign and assuming that there would only ever be one '=' in a user provided option. Sadly, the assumption is incorrect and the list comprehension that is building the options list needs to be set to split on the first occurrence of an '=' sign in a given option string. This commit adds the required change to make it possible for options to contain additional '=' signs and be handled correctly. --- lib/ansible/modules/extras/cloud/lxc/lxc_container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/lxc/lxc_container.py b/lib/ansible/modules/extras/cloud/lxc/lxc_container.py index 1ae67bf23c..c5b290827b 100644 --- a/lib/ansible/modules/extras/cloud/lxc/lxc_container.py +++ b/lib/ansible/modules/extras/cloud/lxc/lxc_container.py @@ -616,7 +616,7 @@ class LxcContainerManagement(object): # TODO(cloudnull) adjust import when issue has been resolved. import ast options_dict = ast.literal_eval(_container_config) - parsed_options = [i.split('=') for i in options_dict] + parsed_options = [i.split('=', 1) for i in options_dict] config_change = False for key, value in parsed_options: