From 6d9560e1777250921ee8c62b55ca7d3638cf1e07 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Wed, 29 May 2019 11:33:28 +0000 Subject: [PATCH] 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 --- common/deploy-steps.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 4c50f06b12..dbcfb67fba 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -726,7 +726,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