From 0053e7c3855424937b4f817b07d1dada41fa0f7e Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 25 Jul 2024 15:58:33 +0200 Subject: [PATCH] Properly apply `always` tag to install_defaults In order to complete a playbook successfully we rely on having deploy-type specific variables, which are provided by install_defaults role. This used to be a simple include_vars statement instead, which was always executed with any tags, but it's not a case now with inlcude_role where we should explicitly take care about always running the role regardless of tags provided. Change-Id: I7a7112dd6a7c3a360dc6c0d206a855c220a027a6 --- playbooks/ceph-install.yml | 15 +++++++++++++++ playbooks/ceph-nfs-install.yml | 5 +++++ playbooks/ceph-rgw-install.yml | 5 +++++ playbooks/ceph-rgw-keystone-setup.yml | 2 ++ playbooks/common-playbooks/cinder.yml | 5 +++++ playbooks/common-playbooks/neutron.yml | 5 +++++ playbooks/containers-lxc-create.yml | 15 +++++++++++++++ playbooks/openstack-hosts-setup.yml | 5 +++++ playbooks/openstack-resources.yml | 5 +++++ playbooks/os-adjutant-install.yml | 5 +++++ playbooks/os-aodh-install.yml | 5 +++++ playbooks/os-barbican-install.yml | 5 +++++ playbooks/os-blazar-install.yml | 5 +++++ playbooks/os-ceilometer-install.yml | 5 +++++ playbooks/os-cloudkitty-install.yml | 5 +++++ playbooks/os-designate-install.yml | 5 +++++ playbooks/os-glance-install.yml | 5 +++++ playbooks/os-gnocchi-install.yml | 5 +++++ playbooks/os-heat-install.yml | 5 +++++ playbooks/os-horizon-install.yml | 5 +++++ playbooks/os-ironic-install.yml | 5 +++++ playbooks/os-keystone-install.yml | 15 +++++++++++++++ playbooks/os-magnum-install.yml | 5 +++++ playbooks/os-manila-install.yml | 5 +++++ playbooks/os-masakari-install.yml | 5 +++++ playbooks/os-mistral-install.yml | 5 +++++ playbooks/os-nova-install.yml | 5 +++++ playbooks/os-octavia-install.yml | 5 +++++ playbooks/os-placement-install.yml | 5 +++++ playbooks/os-rally-install.yml | 5 +++++ playbooks/os-skyline-install.yml | 5 +++++ playbooks/os-swift-install.yml | 5 +++++ playbooks/os-swift-sync.yml | 5 +++++ playbooks/os-tacker-install.yml | 5 +++++ playbooks/os-tempest-install.yml | 5 +++++ playbooks/os-trove-install.yml | 5 +++++ playbooks/repo-install.yml | 5 +++++ playbooks/utility-install.yml | 5 +++++ 38 files changed, 217 insertions(+) diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index ff066886b4..b3d4b52dbd 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -29,6 +29,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather additional facts for monitor_address_block include_tasks: "common-tasks/gather-hardware-facts.yml" @@ -140,6 +145,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather memory facts include_tasks: "common-tasks/gather-hardware-facts.yml" @@ -200,6 +210,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather memory facts include_tasks: "common-tasks/gather-hardware-facts.yml" diff --git a/playbooks/ceph-nfs-install.yml b/playbooks/ceph-nfs-install.yml index 38fe3d5064..85827bb63f 100644 --- a/playbooks/ceph-nfs-install.yml +++ b/playbooks/ceph-nfs-install.yml @@ -29,6 +29,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather ceph-mon facts action: setup diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index aa4a1a770b..7b04d21866 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -33,6 +33,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Importing ceph-server tasks import_tasks: common-tasks/ceph-server.yml diff --git a/playbooks/ceph-rgw-keystone-setup.yml b/playbooks/ceph-rgw-keystone-setup.yml index e25bf12441..4c09cdfc08 100644 --- a/playbooks/ceph-rgw-keystone-setup.yml +++ b/playbooks/ceph-rgw-keystone-setup.yml @@ -30,6 +30,8 @@ import_role: name: openstack.osa.install_defaults defaults_from: "{{ install_method | default('source') }}" + tags: + - always - name: Add service to the keystone service catalog openstack.cloud.catalog_service: diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index b279de8d7f..7f19a88d09 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -25,6 +25,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index 19c68464e3..752648f2af 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -25,6 +25,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index 3eb2daa8d1..2b0fd235c3 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -22,6 +22,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Add hosts to dynamic inventory group group_by: @@ -52,6 +57,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always roles: - role: "lxc_container_create" post_tasks: @@ -84,6 +94,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always roles: - role: "openstack_hosts" is_container: true diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index b54f9156c1..9db70b4379 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -55,6 +55,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Check for a supported Operating System assert: diff --git a/playbooks/openstack-resources.yml b/playbooks/openstack-resources.yml index 710ca73556..3551bff829 100644 --- a/playbooks/openstack-resources.yml +++ b/playbooks/openstack-resources.yml @@ -21,6 +21,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Include openstack_resources role ansible.builtin.include_role: diff --git a/playbooks/os-adjutant-install.yml b/playbooks/os-adjutant-install.yml index fa6954ea3a..340ef9e0d4 100644 --- a/playbooks/os-adjutant-install.yml +++ b/playbooks/os-adjutant-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index 1e9456e16f..6e94171b14 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -48,6 +48,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Disabling haproxy backends include_role: diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 76d4aebbaa..683835225a 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 26104b9adc..74d661291f 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index a73df35075..ca8e93d873 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -34,6 +34,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Including container-setup tasks include_role: diff --git a/playbooks/os-cloudkitty-install.yml b/playbooks/os-cloudkitty-install.yml index 6fe7b25be3..e3f1137105 100644 --- a/playbooks/os-cloudkitty-install.yml +++ b/playbooks/os-cloudkitty-install.yml @@ -45,6 +45,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index 58f84220df..b524f32511 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -47,6 +47,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 1108072dbc..39357941a5 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index af9cab8099..4830ff1446 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index d21f656a52..8f44aa5956 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index db300e93c7..e09e822271 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 933f680f87..02fb805ee7 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 1f79cc7d84..a5587587e2 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -31,6 +31,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always roles: - role: "openstack_openrc" @@ -75,6 +80,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service @@ -148,6 +158,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Refresh local facts setup: diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 58d0280ecf..86528646ed 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -47,6 +47,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index f4a40f6346..5a7b896812 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -43,6 +43,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather additional facts include_tasks: "common-tasks/gather-hardware-facts.yml" diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index d70531cbd0..0db87cf03c 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -64,6 +64,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Gather additional facts include_tasks: "common-tasks/gather-hardware-facts.yml" diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index adbe05c7cf..5efc29a45d 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 7f9169aaef..64f195bc03 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -57,6 +57,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # Enable execution of ceph_client on the nova compute hosts if cinder RBD # backends are used. This is necessary to ensure that volume-backed Nova diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index fe3533fddc..b9a6981f7f 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index 2853572960..4455529284 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/os-rally-install.yml b/playbooks/os-rally-install.yml index 8f98be5721..30f1a71832 100644 --- a/playbooks/os-rally-install.yml +++ b/playbooks/os-rally-install.yml @@ -30,6 +30,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: End playbook meta: end_play diff --git a/playbooks/os-skyline-install.yml b/playbooks/os-skyline-install.yml index cec036aba6..177aa6d9a4 100644 --- a/playbooks/os-skyline-install.yml +++ b/playbooks/os-skyline-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Including container-setup tasks include_role: diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index cd4220b517..3b035a5bf7 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -42,6 +42,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Including container-setup tasks include_role: diff --git a/playbooks/os-swift-sync.yml b/playbooks/os-swift-sync.yml index f2d1f58810..cd20a767b7 100644 --- a/playbooks/os-swift-sync.yml +++ b/playbooks/os-swift-sync.yml @@ -25,6 +25,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always roles: - role: "os_swift" swift_do_setup: False diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index e58ab4e401..36c003ddbf 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -44,6 +44,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/os-tempest-install.yml b/playbooks/os-tempest-install.yml index 8d45efa49f..fe117de928 100644 --- a/playbooks/os-tempest-install.yml +++ b/playbooks/os-tempest-install.yml @@ -33,6 +33,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: End playbook meta: end_play diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 92665fc573..f85b2f69ae 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -47,6 +47,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index 3f00b0ac73..f85c61dc30 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -78,6 +78,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always roles: - role: "repo_server" environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index 864bd9a650..32b5abd3fc 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -51,6 +51,11 @@ name: openstack.osa.install_defaults defaults_from: "{{ install_method }}" public: true + apply: + tags: + - always + tags: + - always - name: Including container-setup tasks include_role: