Fixed generator type assumption error
When adding the swift config pieces the dynamic inventory has attempts to add extra arguments to host _meta inventory which assumes the option is in a dictionary format. To address the issue an if block has been added which which checks the object type and proceeds accordingly. Closes-Bug: 1399387 Change-Id: I0203dc525ca9e8f962ac683ca07b5cb3bea41589
This commit is contained in:
parent
3a13141bc5
commit
1710987f0a
@ -260,10 +260,11 @@ def _append_to_host_groups(inventory, container_type, assignment, host_type,
|
|||||||
limit = None
|
limit = None
|
||||||
# If a limit is set use the limit string as a filter
|
# If a limit is set use the limit string as a filter
|
||||||
# for the container name and see if it matches.
|
# for the container name and see if it matches.
|
||||||
if 'limit_container_types' in options:
|
if isinstance(options, (str, dict, list)):
|
||||||
limit = options.pop(
|
if 'limit_container_types' in options:
|
||||||
'limit_container_types', None
|
limit = options.pop(
|
||||||
)
|
'limit_container_types', None
|
||||||
|
)
|
||||||
|
|
||||||
if limit is None or limit in container:
|
if limit is None or limit in container:
|
||||||
hdata[_keys] = options
|
hdata[_keys] = options
|
||||||
|
Loading…
Reference in New Issue
Block a user