diff --git a/common/deploy-steps-tasks-step-0.yaml b/common/deploy-steps-tasks-step-0.yaml index c1fef68b94..747fef834d 100644 --- a/common/deploy-steps-tasks-step-0.yaml +++ b/common/deploy-steps-tasks-step-0.yaml @@ -41,4 +41,6 @@ - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/deploy_steps_tasks_step0.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 47544fccec..c3abfeb2ce 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -465,7 +465,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "external_deploy_steps_tasks_step0.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool {% endraw %} tags: - external @@ -697,7 +699,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/host_prep_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - overcloud - host_prep_steps @@ -767,7 +771,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/pre_deploy_step_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - overcloud - pre_deploy_steps_tasks @@ -804,7 +810,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "external_deploy_steps_tasks_step{{step}}.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool {% endraw %} tags: - external @@ -860,7 +868,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/deploy_steps_tasks_step{{ step }}.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool {% endraw %} - name: Overcloud common deploy step tasks {{step}} block: @@ -992,7 +1002,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/host_prep_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool {% endraw %} - import_tasks: deploy_steps_tasks_step_0.yaml vars: @@ -1078,7 +1090,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/pre_upgrade_rolling_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - always {% endraw %} @@ -1128,7 +1142,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/upgrade_tasks_step{{ step }}.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - always {% endraw %} @@ -1142,7 +1158,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/post_upgrade_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - always {% endraw %} @@ -1304,7 +1322,9 @@ outputs: - include_tasks: "{{ _task_file_path }}" vars: _task_file_path: "{{ tripleo_role_name }}/post_update_tasks.yaml" - when: playbook_dir ~ '/' ~ _task_file_path is exists + _full_file_path: "{{ playbook_dir }}/{{ _task_file_path }}" + _test_file_exists: "{{ _full_file_path is exists }}" + when: _test_file_exists | bool tags: - always {% endraw %}