diff --git a/common/deploy-steps-tasks-step-0.j2.yaml b/common/deploy-steps-tasks-step-0.j2.yaml index 836be12968..a5b4cae785 100644 --- a/common/deploy-steps-tasks-step-0.j2.yaml +++ b/common/deploy-steps-tasks-step-0.j2.yaml @@ -26,15 +26,10 @@ copy: src=container_puppet_script.yaml dest=/var/lib/container-puppet/container-puppet.sh force=yes mode=0755 setype=container_file_t {%- for role in roles %} -- name: Check for {{role.name}}/deploy_steps_tasks_step0.yaml - delegate_to: localhost - run_once: true - become: false - stat: - path: "{{ '{{' }} playbook_dir ~ '/' ~ '{{role.name}}' ~ '/' ~ 'deploy_steps_tasks_step0.yaml' {{ '}}' }}" - register: tasks_stat -- include_tasks: {{role.name}}/deploy_steps_tasks_step0.yaml +- include_tasks: "{% raw %}{{ _task_file_path }}{% endraw %}" + vars: + _task_file_path: "{{role.name}}/deploy_steps_tasks_step0.yaml" when: - tripleo_role_name == '{{role.name}}' - - tasks_stat.stat.exists + - "{% raw %}'{{ playbook_dir }}/{{ _task_file_path }}' is exists{% endraw %}" {%- endfor %} diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 7859809d82..544c90d79f 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -709,17 +709,12 @@ outputs: debug: msg: Use --start-at-task 'Deploy step tasks for {{step}}' to resume from this task {%- for role in roles %} - - name: Check for {{role.name}}/deploy_steps_tasks_step{{step}}.yaml - delegate_to: localhost - become: false - run_once: true - stat: - path: "{{ '{{' }} playbook_dir ~ '/' ~ '{{role.name}}' ~ '/' ~ 'deploy_steps_tasks_step{{step}}.yaml' {{ '}}' }}" - register: tasks_stat - - include_tasks: {{role.name}}/deploy_steps_tasks_step{{step}}.yaml + - include_tasks: "{% raw %}{{ _task_file_path }}{% endraw %}" + vars: + _task_file_path: "{{role.name}}/deploy_steps_tasks_step{{step}}.yaml" when: - tripleo_role_name == '{{role.name}}' - - tasks_stat.stat.exists + - "{% raw %}'{{ playbook_dir }}/{{ _task_file_path }}' is exists{% endraw %}" {%- endfor %} tags: - overcloud