From f27c7aa1c35cb1b6d848f45698fed60553dab1fa Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotjagov Date: Mon, 25 Mar 2019 09:08:59 +0200 Subject: [PATCH] Convert dynamic includes to static imports When task/role files are included using include_tasks, tags are not passed to the included tasks. As a result, tags like neutron-config do not have the intended effect. This patch changes include_tasks to import_tasks for all cases where dynamic vars or loops are not used so that tags are properly handled. Reference - https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html https://bugs.launchpad.net/openstack-ansible/+bug/1815043 Change-Id: I630ea698191aa7ccd71c8cce34978d42c1935678 --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 13356e8a..410d2300 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -67,22 +67,22 @@ - common-mq - glance-config -- include_tasks: glance_db_setup.yml +- import_tasks: glance_db_setup.yml when: - "glance_services['glance-api']['group'] in group_names" - "inventory_hostname == ((groups[glance_services['glance-api']['group']]| intersect(ansible_play_hosts)) | list)[0]" tags: - glance-config -- include_tasks: glance_service_setup.yml +- import_tasks: glance_service_setup.yml when: - "glance_services['glance-api']['group'] in group_names" - "inventory_hostname == ((groups[glance_services['glance-api']['group']]| intersect(ansible_play_hosts)) | list)[0]" tags: - glance-config -- name: Include ceph_client role - include_role: +- name: Import ceph_client role + import_role: name: ceph_client vars: openstack_service_system_user: "{{ glance_system_user_name }}"