Respect tags in upgrade tasks

There seems to be a difference between how include_tasks and
import_tasks work.

`include_tasks` applies properties on the inclusion itself, and if we
want to apply something on the included tasks, we need to use `apply`
dict. We previously had to add `always` tag onto `include_tasks` to
make the inclusion happen when we ran upgrade with `--tags`.

`import_tasks`, on the other hand, is processed more like a block than
an individual task, and all its properties get applied on the tasks
inside. This meant that the `always` tag got applied on all tags in
the upgrade playbook, instead of on the import itself, which broke use
of tags in `upgrade_tasks`. This is now fixed by removing the tags
from `import_tasks`. The import should happen always regardless if
there are any `tags` on the import.

Change-Id: I66a4ed99f9e0cc199899494813073b4a085d99e7
Closes-Bug: #1830892
(cherry picked from commit 6d9560e177)
This commit is contained in:
Jiri Stransky 2019-05-29 11:33:28 +00:00 committed by Jose Luis Franco Arza
parent 26a0585d40
commit 907271797e
1 changed files with 0 additions and 1 deletions

View File

@ -750,7 +750,6 @@ outputs:
{%- for role in roles %}
- import_tasks: {{role.name}}/upgrade_tasks_step{{step}}.yaml
when: tripleo_role_name == '{{role.name}}'
tags: always
{%- endfor %}
tags:
- upgrade_steps