Pass deployment_options to config download

https://review.opendev.org/673862 allows config_download
workflow to take deployment_options as a input, this patch
passes it to the workflow so ansible_python_interpreter
is set correctly in generated inventory and thus used
during ansible deployment.

Depends-On: https://review.opendev.org/#/c/675804/
Closes-Bug: #1838540
Change-Id: I993fc09fd571fb93d78ffdbecf1823e806f744f4
(cherry picked from commit ac7ae9e8d6)
This commit is contained in:
yatinkarel 2019-07-31 21:39:38 +05:30 committed by Alex Schultz
parent 4d0c4ab51c
commit 17079abbbb
2 changed files with 8 additions and 0 deletions

View File

@ -969,6 +969,11 @@ class DeployOvercloud(command.Command):
used = int(time.time() - start)
timeout = (parsed_args.timeout * 60) - used
deployment_options = {}
if parsed_args.deployment_python_interpreter:
deployment_options['ansible_python_interpreter'] = \
parsed_args.deployment_python_interpreter
disabled_val = parsed_args.disable_validations
enable_val = parsed_args.run_validations
@ -981,6 +986,7 @@ class DeployOvercloud(command.Command):
parsed_args.override_ansible_cfg,
timeout,
verbosity=self.app_args.verbose_level,
deployment_options=deployment_options,
in_flight_validations=(enable_val or not disabled_val))
except Exception:
deployment.set_deployment_status(

View File

@ -312,6 +312,7 @@ def enable_ssh_admin(log, clients, plan_name, hosts, ssh_user, ssh_key):
def config_download(log, clients, stack, templates,
ssh_user, ssh_key, ssh_network,
output_dir, override_ansible_cfg, timeout, verbosity=1,
deployment_options={},
in_flight_validations=True):
workflow_client = clients.workflow_engine
tripleoclients = clients.tripleoclient
@ -326,6 +327,7 @@ def config_download(log, clients, stack, templates,
'plan_name': stack.stack_name,
'ssh_network': ssh_network,
'config_download_timeout': timeout,
'deployment_options': deployment_options,
'skip_tags': skip_tags
}
if output_dir: