Move environment to a var fo easier debugging

If we configure the environment vars as an internal variable it allows
us to print them out with the command when debugging is enabled.

Change-Id: Ida7b9f1a4c3b27c7f702bf47d5992646eb34430c
This commit is contained in:
Alex Schultz
2020-02-04 15:59:10 -07:00
parent 8bf5e779a5
commit 27097a9789

View File

@@ -44,20 +44,7 @@
{{ tripleo_overcloud_deploy_baremetal_deployment | ternary('--baremetal-deployment $DEPLOY_BAREMETAL_DEPLOYMENT', '') }}
{{ tripleo_overcloud_deploy_log_output | ternary((">" ~ tripleo_overcloud_deploy_log), '') }}
{{ tripleo_overcloud_deploy_log_combine | ternary("2>&1", '') }}
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_overcloud_deploy_log }}"
when: tripleo_overcloud_deploy_log_output|bool
- name: Show the overcloud deploy command
debug:
var: _deploy_cmd
when: tripleo_overcloud_deploy_debug|bool
- name: Overcloud deploy
shell: "{{ _deploy_cmd }}" # noqa 305
environment:
_deploy_env:
DEPLOY_TEMPLATES: "{{ tripleo_overcloud_deploy_templates }}"
DEPLOY_STACK: "{{ tripleo_overcloud_deploy_stack }}"
DEPLOY_TIMEOUT_ARG: "{{ tripleo_overcloud_deploy_timeout_arg }}"
@@ -78,6 +65,26 @@
DEPLOY_CONFIG_DOWNLOAD_TIMEOUT: "{{ tripleo_overcloud_deploy_config_download_timeout }}"
DEPLOY_PYTHON_INTERPRETER: "{{ tripleo_overcloud_deploy_deployment_python_interpreter }}"
DEPLOY_BAREMETAL_DEPLOYMENT: "{{ tripleo_overcloud_deploy_baremetal_deployment }}"
- name: Preserve existing log file if exists
timestamp_file:
path: "{{ tripleo_overcloud_deploy_log }}"
when: tripleo_overcloud_deploy_log_output|bool
- name: Show debug information
when: tripleo_overcloud_deploy_debug|bool
block:
- name: Show the overcloud deploy command
debug:
var: _deploy_cmd
- name: Show the overcloud deploy environment
debug:
var: _deploy_env
- name: Overcloud deploy
shell: "{{ _deploy_cmd }}" # noqa 305
environment: "{{ _deploy_env }}"
args:
chdir: "{{ tripleo_overcloud_deploy_home_dir }}"
warn: false