From 9b50edb6262f2647732b5bf3ab8000b996826bf5 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 14 May 2020 20:52:53 +0300 Subject: [PATCH] Resolve issue with undefined facts while running with tags Ansible fixed "issue" where gather_facts was working with any tag defined Now this behaviour changed and we need to gather facts not depending on the provided tag. Some info provided here [1] [1] https://github.com/ansible/ansible/issues/57529 Change-Id: Idc8be5f490cba79e70a45d159718ab68c78cbcee --- inventory/group_vars/all/ceph.yml | 2 +- playbooks/ceph-install.yml | 65 +++++++++----------------- playbooks/ceph-nfs-install.yml | 7 +++ playbooks/ceph-rgw-install.yml | 9 +++- playbooks/common-playbooks/cinder.yml | 8 +++- playbooks/common-playbooks/glance.yml | 8 +++- playbooks/common-playbooks/neutron.yml | 8 +++- playbooks/common-playbooks/nova.yml | 6 +++ playbooks/containers-lxc-create.yml | 8 +++- playbooks/containers-lxc-host.yml | 10 +++- playbooks/containers-nspawn-create.yml | 12 +++-- playbooks/containers-nspawn-host.yml | 8 +++- playbooks/etcd-install.yml | 8 +++- playbooks/galera-install.yml | 10 +++- playbooks/haproxy-install.yml | 8 +++- playbooks/infra-journal-remote.yml | 8 +++- playbooks/memcached-install.yml | 8 +++- playbooks/openstack-hosts-setup.yml | 8 +++- playbooks/os-aodh-install.yml | 8 +++- playbooks/os-barbican-install.yml | 8 +++- playbooks/os-blazar-install.yml | 8 +++- playbooks/os-ceilometer-install.yml | 8 +++- playbooks/os-congress-install.yml | 8 +++- playbooks/os-designate-install.yml | 8 +++- playbooks/os-gnocchi-install.yml | 7 +++ playbooks/os-heat-install.yml | 8 +++- playbooks/os-horizon-install.yml | 8 +++- playbooks/os-ironic-install.yml | 8 +++- playbooks/os-keystone-install.yml | 8 +++- playbooks/os-magnum-install.yml | 7 +++ playbooks/os-manila-install.yml | 10 +++- playbooks/os-masakari-install.yml | 8 +++- playbooks/os-mistral-install.yml | 8 +++- playbooks/os-murano-install.yml | 8 +++- playbooks/os-octavia-install.yml | 8 +++- playbooks/os-panko-install.yml | 8 +++- playbooks/os-placement-install.yml | 8 +++- playbooks/os-rally-install.yml | 8 +++- playbooks/os-sahara-install.yml | 6 +++ playbooks/os-swift-install.yml | 9 +++- playbooks/os-tacker-install.yml | 8 +++- playbooks/os-tempest-install.yml | 8 +++- playbooks/os-trove-install.yml | 8 +++- playbooks/os-zun-install.yml | 8 +++- playbooks/qdrouterd-install.yml | 9 +++- playbooks/rabbitmq-install.yml | 11 ++++- playbooks/repo-install.yml | 8 +++- playbooks/rsyslog-install.yml | 8 +++- playbooks/security-hardening.yml | 8 +++- playbooks/unbound-install.yml | 11 +++-- playbooks/utility-install.yml | 8 +++- 51 files changed, 374 insertions(+), 97 deletions(-) diff --git a/inventory/group_vars/all/ceph.yml b/inventory/group_vars/all/ceph.yml index 021f80783a..fc50404ec5 100644 --- a/inventory/group_vars/all/ceph.yml +++ b/inventory/group_vars/all/ceph.yml @@ -21,7 +21,7 @@ mgr_group_name: "{{ mon_group_name }}" osd_group_name: ceph-osd rgw_group_name: ceph-rgw mds_group_name: ceph-mds -nfs_group_name: nfss +nfs_group_name: ceph-nfs ceph_origin: "{{ (ansible_pkg_mgr == 'zypper') | ternary('distro', 'repository') }}" ceph_repository: community # The _stable_release var is used by both the OSA ceph_client role and the diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index 8fd9a1b18d..dde21efb4d 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -13,9 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather ceph-mon facts + hosts: ceph-mon + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install ceph mons hosts: ceph-mon user: root + gather_facts: false vars_files: - "defaults/{{ install_method }}_install.yml" - "defaults/ceph_ansible.yml" @@ -44,17 +51,6 @@ - ansible_pkg_mgr in ['yum', 'dnf'] - ansible_service_mgr == 'systemd' - # Set the priority of the ceph community apt repo either above or below that of UCA or distro sources - - name: Set apt package pins - include_role: - name: apt_package_pinning - vars: - apt_package_pinning_file_name: "ceph_community_pin.pref" - apt_package_pinning_priority: "{{ (ceph_repository == 'community') | ternary(1000, 100) }}" - apt_pinned_packages: [{ package: '*', release: 'ceph.com' }] - when: - - ansible_pkg_mgr == 'apt' - roles: - role: ceph-defaults tags: @@ -95,9 +91,16 @@ - ceph - ceph-mon +- name: Gather ceph-osd facts + hosts: ceph-osd + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install ceph osds hosts: ceph-osd user: root + gather_facts: false vars_files: - "defaults/{{ install_method }}_install.yml" - "defaults/ceph_ansible.yml" @@ -105,28 +108,6 @@ - import_tasks: common-tasks/ceph-server.yml - - name: Gather ceph-mon facts - action: setup - delegate_to: "{{ item }}" - delegate_facts: yes - with_items: "{{ groups[mon_group_name] }}" - when: - - inventory_hostname == ansible_play_hosts[0] - tags: - - ceph-osd - - ceph-mon-facts - - # Set the priority of the ceph community apt repo either above or below that of UCA or distro sources - - name: Set apt package pins - include_role: - name: apt_package_pinning - vars: - apt_package_pinning_file_name: "ceph_community_pin.pref" - apt_package_pinning_priority: "{{ (ceph_repository == 'community') | ternary(1000, 100) }}" - apt_pinned_packages: [{ package: '*', release: 'ceph.com' }] - when: - - ansible_pkg_mgr == 'apt' - roles: - role: ceph-defaults tags: @@ -162,23 +143,19 @@ - ceph - ceph-osd +- name: Gather ceph-mds facts + hosts: ceph-mds + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install ceph metadata servers hosts: ceph-mds + gather_facts: false user: root vars_files: - "defaults/{{ install_method }}_install.yml" - "defaults/ceph_ansible.yml" - pre_tasks: - - name: Gather ceph-mon facts - action: setup - delegate_to: "{{ item }}" - delegate_facts: yes - with_items: "{{ groups[mon_group_name] }}" - when: - - inventory_hostname == ansible_play_hosts[0] - tags: - - ceph-mon-facts - - ceph-mds roles: - role: ceph-defaults tags: diff --git a/playbooks/ceph-nfs-install.yml b/playbooks/ceph-nfs-install.yml index 2b0f601669..d4e72b6079 100644 --- a/playbooks/ceph-nfs-install.yml +++ b/playbooks/ceph-nfs-install.yml @@ -13,8 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather ceph-nfs facts + hosts: ceph-nfs + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install nfs-ganesha server hosts: ceph-nfs + gather_facts: false user: root vars_files: - "defaults/{{ install_method }}_install.yml" diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 34b6aa8d70..520699efe9 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -14,10 +14,17 @@ # limitations under the License. - import_playbook: ceph-rgw-keystone-setup.yml - when: (groups['ceph-rgw'] is defined and groups['ceph-rgw'] | length > 0) or (ceph_rgws | length > 0) + when: (groups[rgw_group_name] is defined and groups[rgw_group_name] | length > 0) or (ceph_rgws | length > 0) + +- name: Gather ceph-rgw facts + hosts: ceph-rgw + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always - name: Install ceph radosgw hosts: ceph-rgw + gather_facts: false user: root vars_files: - "defaults/{{ install_method }}_install.yml" diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 8f19201c10..0ebc011d34 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather cinder facts + hosts: "{{ cinder_hosts }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install cinder services hosts: "{{ cinder_hosts }}" serial: "{{ cinder_serial }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/common-playbooks/glance.yml b/playbooks/common-playbooks/glance.yml index cc9da42f8a..61e0629f88 100644 --- a/playbooks/common-playbooks/glance.yml +++ b/playbooks/common-playbooks/glance.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather glance facts + hosts: "{{ glance_hosts }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install glance services hosts: "{{ glance_hosts }}" serial: "{{ glance_serial }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index f2a417bae7..204abdb2af 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather neutron facts + hosts: "{{ neutron_hosts }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install neutron services hosts: "{{ neutron_hosts }}" serial: "{{ neutron_serial }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index c310c9d4b1..8bc8fb01ea 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -13,6 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather nova facts + hosts: "{{ nova_hosts }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install nova services hosts: "{{ nova_hosts }}" serial: "{{ nova_serial }}" diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index a55ca2b4d8..7b57e3f617 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -60,10 +60,16 @@ setup: gather_subset: "network,hardware,virtual" +- name: Gather lxc containers facts + hosts: all_lxc_containers + gather_facts: true + tags: + - always + - name: Configure containers default software hosts: all_lxc_containers user: root - gather_facts: true + gather_facts: false vars_files: - defaults/repo_packages/openstack_services.yml - "defaults/{{ install_method }}_install.yml" diff --git a/playbooks/containers-lxc-host.yml b/playbooks/containers-lxc-host.yml index b95aa702e0..19365d8068 100644 --- a/playbooks/containers-lxc-host.yml +++ b/playbooks/containers-lxc-host.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather lxc hosts facts + hosts: "{{ lxc_host_group | default('lxc_hosts') }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Basic lxc host setup - hosts: "{{ lxc_host_group | default('lxc_hosts')}}" + hosts: "{{ lxc_host_group | default('lxc_hosts') }}" user: root - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false vars_files: - defaults/repo_packages/openstack_services.yml - "defaults/{{ install_method }}_install.yml" diff --git a/playbooks/containers-nspawn-create.yml b/playbooks/containers-nspawn-create.yml index b2408a2a46..efbec0eb5e 100644 --- a/playbooks/containers-nspawn-create.yml +++ b/playbooks/containers-nspawn-create.yml @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Gather nspawn container host facts +- name: Gather nspawn host facts hosts: "{{ nspawn_host_group | default('nspawn_hosts') }}" gather_facts: true - + tags: + - always - name: Set nspawn containers group hosts: "{{ container_group | default('all_containers') }}" @@ -61,10 +62,15 @@ command: "btrfs quota rescan -w /var/lib/machines" changed_when: false +- name: Gather nspawn containers facts + hosts: all_nspawn_containers + gather_facts: true + tags: + - always - name: Configure containers default software hosts: all_nspawn_containers - gather_facts: true + gather_facts: false user: root vars_files: - defaults/repo_packages/openstack_services.yml diff --git a/playbooks/containers-nspawn-host.yml b/playbooks/containers-nspawn-host.yml index 3988a51ae1..6e2eaa739d 100644 --- a/playbooks/containers-nspawn-host.yml +++ b/playbooks/containers-nspawn-host.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Additional nspawn host setup +- name: Gather nspawn hosts facts hosts: "{{ nspawn_host_group | default('nspawn_hosts') }}" gather_facts: true + tags: + - always + +- name: Additional nspawn host setup + hosts: "{{ nspawn_host_group | default('nspawn_hosts') }}" + gather_facts: false vars_files: - "defaults/{{ install_method }}_install.yml" user: root diff --git a/playbooks/etcd-install.yml b/playbooks/etcd-install.yml index 7a6f6b1541..cc46e17084 100644 --- a/playbooks/etcd-install.yml +++ b/playbooks/etcd-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install etcd server cluster +- name: Gather etcd facts hosts: etcd gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install etcd server cluster + hosts: etcd + gather_facts: false user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index e269da1ca9..5392fa97e7 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Galera container config +- name: Gather galera facts hosts: galera_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Galera container config + hosts: galera_all + gather_facts: false serial: 1 user: root tasks: @@ -34,7 +40,7 @@ - name: Install galera server hosts: galera_all - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false serial: 1 user: root roles: diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index f8230c9696..42e93c7311 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: haproxy base config +- name: Gather haproxy facts hosts: haproxy gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: haproxy base config + hosts: haproxy + gather_facts: false serial: "50%" user: root pre_tasks: diff --git a/playbooks/infra-journal-remote.yml b/playbooks/infra-journal-remote.yml index 32f711dc25..e3681ec9ae 100644 --- a/playbooks/infra-journal-remote.yml +++ b/playbooks/infra-journal-remote.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install Journal-Remote +- name: Gather facts hosts: hosts gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install Journal-Remote + hosts: hosts + gather_facts: false become: true handlers: - name: Restart systemd-journald diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index e6d7a687ef..0bc5040f07 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install memcached +- name: Gather memcached facts hosts: memcached gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install memcached + hosts: memcached + gather_facts: false user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index 09419163a5..f40edba70b 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -39,9 +39,15 @@ changed_when: "result.rc == 2" failed_when: "result.rc not in [0, 2]" -- name: Basic host setup +- name: Gather host facts hosts: "{{ openstack_host_group|default('hosts') }}" gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Basic host setup + hosts: "{{ openstack_host_group|default('hosts') }}" + gather_facts: false user: root pre_tasks: - name: Check for a supported Operating System diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index 2893340657..4730c0d516 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install the aodh components +- name: Gather aodh facts hosts: aodh_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install the aodh components + hosts: aodh_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 358ba676a3..6f8bda1d7e 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Installation and setup of barbican +- name: Gather barbican facts hosts: barbican_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Installation and setup of barbican + hosts: barbican_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 23bbdc191a..1166222d0f 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install blazar components +- name: Gather blazar facts hosts: blazar_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install blazar components + hosts: blazar_all + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index e800448e0e..f821da480d 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install the ceilometer components +- name: Gather ceilometer facts hosts: ceilometer_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install the ceilometer components + hosts: ceilometer_all + gather_facts: false user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-congress-install.yml b/playbooks/os-congress-install.yml index be59d25bb0..eeeb66f4ec 100644 --- a/playbooks/os-congress-install.yml +++ b/playbooks/os-congress-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather congress facts + hosts: congress_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install congress components hosts: congress_all - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: false max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index d0a23d14e1..19f7ecb124 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -16,9 +16,15 @@ # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens -- name: Install designate server +- name: Gather designate facts hosts: designate_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install designate server + hosts: designate_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index ff17dc7044..4168d7fed5 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -13,8 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather gnocchi facts + hosts: gnocchi_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install Gnocchi components hosts: gnocchi_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index 4be5e4b70b..5f3de6db5a 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install heat server +- name: Gather heat facts hosts: heat_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install heat server + hosts: heat_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 30989550ce..a1bdd7e2b2 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install horizon server +- name: Gather horizon facts hosts: horizon_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install horizon server + hosts: horizon_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 7517f03fe6..4caf34ebce 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Installation and setup of Ironic +- name: Gather ironic facts hosts: ironic_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Installation and setup of Ironic + hosts: ironic_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index 554d8d459e..12ea16d549 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -28,12 +28,16 @@ roles: - role: "openstack_openrc" - +- name: Gather keystone facts + hosts: keystone_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always - name: Installation and setup of Keystone hosts: keystone_all serial: "{{ keystone_serial | default(['1', '100%']) }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 9ee40ab868..a734f884a8 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -16,9 +16,16 @@ # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens +- name: Gather magnum facts + hosts: magnum_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install magnum server hosts: magnum_all user: root + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index 47477a04fc..1d26fa2582 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -16,9 +16,15 @@ - name: Install ganesha-nfs import_playbook: ceph-nfs-install.yml +- name: Gather manila facts + hosts: manila_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install manila API services hosts: manila_api:manila_scheduler - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: @@ -60,7 +66,7 @@ - name: Install manila data services hosts: manila_data:manila_share - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index b9e1d33dbc..23693ed5c5 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install the masakari components +- name: Gather masakari facts hosts: masakari_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install the masakari components + hosts: masakari_all + gather_facts: false user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index 4682fdeebe..eeaa2c74ff 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install mistral components +- name: Gather mistral facts hosts: mistral_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install mistral components + hosts: mistral_all + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-murano-install.yml b/playbooks/os-murano-install.yml index 00deab40f5..7929503175 100644 --- a/playbooks/os-murano-install.yml +++ b/playbooks/os-murano-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install murano components +- name: Gather murano facts hosts: murano_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install murano components + hosts: murano_all + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index edd64940d7..b90374d738 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install octavia server +- name: Gather octavia facts hosts: octavia_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install octavia server + hosts: octavia_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-panko-install.yml b/playbooks/os-panko-install.yml index abddb2e730..b227df99e5 100644 --- a/playbooks/os-panko-install.yml +++ b/playbooks/os-panko-install.yml @@ -12,9 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install the panko components +- name: Gather panko facts hosts: panko_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install the panko components + hosts: panko_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index e8509775d7..6fb99dbf4d 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install placement components +- name: Gather placement facts hosts: placement_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install placement components + hosts: placement_all + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-rally-install.yml b/playbooks/os-rally-install.yml index 1319b6f6a4..bef4e247ae 100644 --- a/playbooks/os-rally-install.yml +++ b/playbooks/os-rally-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Installation and setup of Rally +- name: Gather rally facts hosts: utility_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Installation and setup of Rally + hosts: utility_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index 49137e7abd..71a15c593d 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -11,6 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather sahara facts + hosts: sahara_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install sahara server hosts: sahara_all gather_facts: "{{ osa_gather_facts | default(True) }}" diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 60e676a394..5fb2c42646 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Installation and setup of Swift +- name: Gather swift facts hosts: swift_all:swift_remote_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Installation and setup of Swift + hosts: swift_all:swift_remote_all + gather_facts: false user: root vars_files: - "defaults/repo_packages/openstack_services.yml" @@ -41,6 +47,7 @@ - name: Installation and setup of Swift hosts: swift_all + gather_facts: false user: root roles: - role: "system_crontab_coordination" diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index 15a9ecf0b7..523edeab8c 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install the tacker components +- name: Gather tacker facts hosts: tacker_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install the tacker components + hosts: tacker_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-tempest-install.yml b/playbooks/os-tempest-install.yml index bb31005a0d..cd007bbcba 100644 --- a/playbooks/os-tempest-install.yml +++ b/playbooks/os-tempest-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Installation and setup of Tempest +- name: Gather tempest facts hosts: utility_all[0] gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Installation and setup of Tempest + hosts: utility_all[0] + gather_facts: false user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 426cfe15c7..2141966638 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -16,9 +16,15 @@ # (c) 2016 Donovan Francesco # (c) 2016 Paul Stevens -- name: Install trove server +- name: Gather trove facts hosts: trove_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install trove server + hosts: trove_all + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-zun-install.yml b/playbooks/os-zun-install.yml index d5110e8ee0..6db8c1875e 100644 --- a/playbooks/os-zun-install.yml +++ b/playbooks/os-zun-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather zun facts + hosts: zun + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Install the zun components hosts: zun_all - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/qdrouterd-install.yml b/playbooks/qdrouterd-install.yml index f24a87b5e5..2ebb59f1a9 100644 --- a/playbooks/qdrouterd-install.yml +++ b/playbooks/qdrouterd-install.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather qdrouterd facts + hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Create and configure qdrouterd container hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}" serial: 1 - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: @@ -39,6 +45,7 @@ hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}" serial: 20% user: root + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" tags: - qdrouterd diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index 5d303b14bc..e378c92c28 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather etcd facts + hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}" + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Create and configure rabbitmq container hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}" serial: 1 - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" @@ -38,6 +44,7 @@ # http://www.rabbitmq.com/clustering.html#upgrading - name: Stop RabbitMQ nodes that are not the upgrader hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}[1:]" + gather_facts: false user: root tasks: - name: "Stop RabbitMQ" @@ -48,6 +55,7 @@ - name: Install rabbitmq server hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}" + gather_facts: false serial: 20% user: root roles: @@ -66,6 +74,7 @@ - name: Ensure rabbitmq user for monitoring GUI hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}[0]" + gather_facts: false user: root tasks: - name: Create rabbitmq user for monitoring GUI diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index d8f0ab63cd..aa5131b088 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Setup repo servers +- name: Gather repo facts hosts: repo_all gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Setup repo servers + hosts: repo_all + gather_facts: false user: root pre_tasks: - name: End playbook diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index fe3dd2363e..55a3a027af 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -13,9 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install rsyslog +- name: Gather rsyslog facts hosts: rsyslog gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install rsyslog + hosts: rsyslog + gather_facts: false user: root pre_tasks: # The systemd-journal-remote capability has taken over this functionality. diff --git a/playbooks/security-hardening.yml b/playbooks/security-hardening.yml index 156aca8e38..c64de29356 100644 --- a/playbooks/security-hardening.yml +++ b/playbooks/security-hardening.yml @@ -17,9 +17,15 @@ # 'apply_security_hardening' boolean set to True for it to apply security # hardening standards to a system. -- name: Apply security hardening configurations +- name: Gather security hardening facts hosts: "{{ security_host_group|default('hosts') }}" gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Apply security hardening configurations + hosts: "{{ security_host_group|default('hosts') }}" + gather_facts: false user: root roles: - role: "ansible-hardening" diff --git a/playbooks/unbound-install.yml b/playbooks/unbound-install.yml index 1c6f3dd793..a8b571293b 100644 --- a/playbooks/unbound-install.yml +++ b/playbooks/unbound-install.yml @@ -13,10 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Install unbound DNS resolvers - hosts: - - unbound +- name: Gather unbound facts + hosts: unbound gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + +- name: Install unbound DNS resolvers + hosts: unbound + gather_facts: false user: root pre_tasks: - include_tasks: common-tasks/os-log-dir-setup.yml diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index 27d83e57c2..7492b09260 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -13,10 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Gather utility facts + hosts: utility_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + tags: + - always + - name: Setup the utility location(s) hosts: utility_all user: root - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false environment: "{{ deployment_environment_variables | default({}) }}" vars_files: - "defaults/repo_packages/openstack_services.yml"