Ensure --limit option takes precedence over skiplist

Now that we've decided to ignore skiplist when limit
is specified, ensure we do that in master/ussuri.

Change-Id: I8a67554f268042d2cceebf3ec3b1f098f001bbfd
Related-Bug: #1857298
This commit is contained in:
Rabi Mishra 2020-07-16 13:09:51 +05:30
parent 9c53cb3ef5
commit a39424c19e
1 changed files with 9 additions and 11 deletions

View File

@ -390,17 +390,15 @@ def config_download(log, clients, stack, ssh_network='ctlplane',
logger=log,
print_msg=(verbosity == 0)
)
blacklist_show = stack.output_show('BlacklistedHostnames')
blacklist_stack_output = blacklist_show.get('output', dict())
blacklist_stack_output_value = blacklist_stack_output.get('output_value')
if blacklist_stack_output_value:
if not limit_hosts:
limit_hosts = ""
limit_hosts += (
':'.join(['!{}'.format(i) for i in blacklist_stack_output_value
if i]))
if not limit_hosts:
blacklist_show = stack.output_show('BlacklistedHostnames')
blacklist_stack_output = blacklist_show.get('output', dict())
blacklist_stack_output_value = blacklist_stack_output.get(
'output_value')
if blacklist_stack_output_value:
limit_hosts = (
':'.join(['!{}'.format(i) for i in blacklist_stack_output_value
if i]))
key_file = utils.get_key(stack.stack_name)
python_interpreter = deployment_options.get('ansible_python_interpreter')