Stop using a conditional for role tasks
Currently this task definition is causing the following warning to be thrown at execution time: [WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: '{{ playbook_dir }}/{{ _task_file_path }}' is exists There is no reason to be using this conditional with a variable since this file path is known when we create the playbook. Additionally we don't need to use the playbook_dir because we're not using it in the include_tasks. This allows us to specifically express the file that we're using for these tasks inclusions rather than relying on a conditional that is not recommended. Change-Id: I368e99d2384469ca166e2e2b00e8621b7afe72db
This commit is contained in:
parent
1ed76a298c
commit
ea62bcf150
|
@ -765,12 +765,10 @@ outputs:
|
||||||
debug:
|
debug:
|
||||||
msg: Use --start-at-task 'Deploy step tasks for {{step}}' to resume from this task
|
msg: Use --start-at-task 'Deploy step tasks for {{step}}' to resume from this task
|
||||||
{%- for role in roles %}
|
{%- for role in roles %}
|
||||||
- include_tasks: "{% raw %}{{ _task_file_path }}{% endraw %}"
|
- include_tasks: "{{role.name}}/deploy_steps_tasks_step{{step}}.yaml"
|
||||||
vars:
|
|
||||||
_task_file_path: "{{role.name}}/deploy_steps_tasks_step{{step}}.yaml"
|
|
||||||
when:
|
when:
|
||||||
- tripleo_role_name == '{{role.name}}'
|
- tripleo_role_name == '{{role.name}}'
|
||||||
- "{% raw %}'{{ playbook_dir }}/{{ _task_file_path }}' is exists{% endraw %}"
|
- "'{{role.name}}/deploy_steps_tasks_step{{step}}.yaml' is exists"
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{% if step == 1 %}
|
{% if step == 1 %}
|
||||||
- name: Overcloud common bootstrap tasks for step 1
|
- name: Overcloud common bootstrap tasks for step 1
|
||||||
|
|
Loading…
Reference in New Issue