mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user