Browse Source

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)
tags/11.5.1
yatinkarel 1 month ago
parent
commit
17079abbbb
2 changed files with 8 additions and 0 deletions
  1. 6
    0
      tripleoclient/v1/overcloud_deploy.py
  2. 2
    0
      tripleoclient/workflows/deployment.py

+ 6
- 0
tripleoclient/v1/overcloud_deploy.py View File

@@ -969,6 +969,11 @@ class DeployOvercloud(command.Command):
969 969
                     used = int(time.time() - start)
970 970
                     timeout = (parsed_args.timeout * 60) - used
971 971
 
972
+                deployment_options = {}
973
+                if parsed_args.deployment_python_interpreter:
974
+                    deployment_options['ansible_python_interpreter'] = \
975
+                        parsed_args.deployment_python_interpreter
976
+
972 977
                 disabled_val = parsed_args.disable_validations
973 978
                 enable_val = parsed_args.run_validations
974 979
 
@@ -981,6 +986,7 @@ class DeployOvercloud(command.Command):
981 986
                     parsed_args.override_ansible_cfg,
982 987
                     timeout,
983 988
                     verbosity=self.app_args.verbose_level,
989
+                    deployment_options=deployment_options,
984 990
                     in_flight_validations=(enable_val or not disabled_val))
985 991
             except Exception:
986 992
                 deployment.set_deployment_status(

+ 2
- 0
tripleoclient/workflows/deployment.py View File

@@ -312,6 +312,7 @@ def enable_ssh_admin(log, clients, plan_name, hosts, ssh_user, ssh_key):
312 312
 def config_download(log, clients, stack, templates,
313 313
                     ssh_user, ssh_key, ssh_network,
314 314
                     output_dir, override_ansible_cfg, timeout, verbosity=1,
315
+                    deployment_options={},
315 316
                     in_flight_validations=True):
316 317
     workflow_client = clients.workflow_engine
317 318
     tripleoclients = clients.tripleoclient
@@ -326,6 +327,7 @@ def config_download(log, clients, stack, templates,
326 327
         'plan_name': stack.stack_name,
327 328
         'ssh_network': ssh_network,
328 329
         'config_download_timeout': timeout,
330
+        'deployment_options': deployment_options,
329 331
         'skip_tags': skip_tags
330 332
     }
331 333
     if output_dir:

Loading…
Cancel
Save