Skip to content

Commit

Permalink
Merge pull request #755 from rabi/gather_facts
Browse files Browse the repository at this point in the history
Don't gather facts by default
  • Loading branch information
openshift-merge-bot[bot] authored Sep 20, 2024
2 parents ff28886 + 530ba9e commit c096087
Show file tree
Hide file tree
Showing 41 changed files with 97 additions and 4 deletions.
4 changes: 3 additions & 1 deletion playbooks/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
- name: Check remote connections
hosts: "{{ edpm_override_hosts | default('all', true) }}"
gather_facts: false
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
tasks:
- name: Wait for connection
ansible.builtin.wait_for_connection:
Expand All @@ -10,6 +11,7 @@
- name: Bootstrap node
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/ceph_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Configure EDPM as client of Ceph
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/ceph_hci_pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Prepare EDPM to Host Ceph
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/configure_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Network
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/configure_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Operating System Configure
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/configure_ovs_dpdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Configure OvS DPDK
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
tasks:
- name: Configure OvS DPDK configs
ansible.builtin.import_role:
Expand Down
1 change: 1 addition & 0 deletions playbooks/download_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: EDPM Download cache
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/fips_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: FIPS status
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/frr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM FRR
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/install_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: EDPM Install Certs
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: free
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/install_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Operating System Install
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/libvirt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM libvirt
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/neutron_dhcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Neutron DHCP agent
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/neutron_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Deploy EDPM Neutron OVN Metadata agent
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/neutron_ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Deploy EDPM Neutron OVN agent
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/neutron_sriov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Neutron SR-IOV agent
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/nova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- name: Deploy EDPM Nova
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/nova_storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy Nova storage infrastructure
hosts: all
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/ovn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM OVN
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/ovn_bgp_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM OVN BGP Agent
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/pre_adoption_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Validate adoption configuration
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Reboot nodes if reboot is required
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
tasks:
- name: Run edpm_reboot
ansible.builtin.import_role:
Expand Down
1 change: 1 addition & 0 deletions playbooks/run_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Operating System Run
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/select_kernel_ddp_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Select Kernel DDP Package
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/sriov_derive_device_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Derive sriov device_spec
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/ssh_known_hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM SSH Known Hosts
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: Deploy EDPM Swift
hosts: all
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/telemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: Deploy EDPM telemetry metrics
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: true
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
# Doesn't handle rsyslog
Expand Down
2 changes: 1 addition & 1 deletion playbooks/telemetry_logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: Configure EDPM telemetry logging
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: true
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: true
# Only enables rsyslog
tasks:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/tripleo_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: Cleanup Tripleo services
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: true
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: EDPM Update
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
1 change: 1 addition & 0 deletions playbooks/validate_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- name: EDPM Node validation
hosts: "{{ edpm_override_hosts | default('all', true) }}"
strategy: linear
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}"
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}"
tasks:
Expand Down
7 changes: 7 additions & 0 deletions roles/edpm_bootstrap/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---
- name: Gather facts if they don't exist
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "distribution"
when: "'distribution' not in ansible_facts"

- name: Download needed packages
ansible.builtin.dnf:
Expand Down
4 changes: 4 additions & 0 deletions roles/edpm_frr/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
Failed to map at least one interface from {{ edpm_frr_bgp_uplinks }} to {{ iface_map }}.
Please check value of Ansible variable edpm_frr_bgp_uplinks.
- name: Gather facts if they don't exist
ansible.builtin.setup:
gather_subset: min

- name: Configure FRR
ansible.builtin.template:
src: frr.conf.j2
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_logrotate_crond/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
retries: "{{ edpm_logrotate_crond_download_retries }}"
delay: "{{ edpm_logrotate_crond_download_delay }}"

- name: Gather SELinux fact if needed
when:
- ansible_facts.selinux is undefined
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "selinux"

- name: Allow logrotate to read inside containers
become: true
ansible.posix.seboolean:
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_neutron_metadata/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
- {'path': "{{ edpm_neutron_metadata_agent_lib_dir }}/ovn-metadata-proxy", "mode": "0755"}
- {'path': "{{ edpm_neutron_metadata_agent_lib_dir }}/external/pids", "mode": "0755"}

- name: Gather SELinux fact if needed
when:
- ansible_facts.selinux is undefined
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "selinux"

- name: Enable virt_sandbox_use_netlink for healthcheck
become: true
ansible.posix.seboolean:
Expand Down
4 changes: 4 additions & 0 deletions roles/edpm_neutron_ovn/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
- "{{ edpm_neutron_ovn_tls_cacert_bundle_src }}:{{ edpm_neutron_ovn_tls_cacert_bundle_dest }}:ro,z"
when: cacert_bundle_exists.stat.exists

- name: Gather facts if they don't exist
ansible.builtin.setup:
gather_subset: min

- name: Configure neutron configuration files
block:
- name: Render neutron config files
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_ovn/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
delegate_to: localhost
become: false

- name: Gather ansible_machine_id fact if needed
when:
- ansible_machine_id is undefined
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "machine"

- name: Load ovsdb configuration from file
ansible.builtin.include_vars:
file: "{{ edpm_ovn_config_src }}/ovsdb-config"
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_ovn/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
- {'path': /var/lib/edpm-config/firewall, 'mode': '0750'}
- {'path': /var/lib/openvswitch/ovn, "owner": "openvswitch", "group": "openvswitch"}

- name: Gather SELinux fact if needed
when:
- ansible_facts.selinux is undefined
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "selinux"

- name: Enable virt_sandbox_use_netlink for healthcheck
become: true
ansible.posix.seboolean:
Expand Down
9 changes: 9 additions & 0 deletions roles/edpm_ovn_bgp_agent/tasks/install_ovn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
loop:
- {'path': /var/lib/openvswitch/ovn, 'setype': container_file_t}

- name: Gather SELinux fact if needed
when:
- ansible_facts.selinux is undefined
ansible.builtin.setup:
gather_subset:
- "!all"
- "!min"
- "selinux"

- name: Enable virt_sandbox_use_netlink for healthcheck
become: true
ansible.posix.seboolean:
Expand Down
3 changes: 3 additions & 0 deletions roles/edpm_tripleo_cleanup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
ansible.builtin.systemd_service:
daemon_reload: true

- name: Gather service facts
ansible.builtin.service_facts:

- name: Set list of tripleo services
tags:
- adoption
Expand Down

0 comments on commit c096087

Please sign in to comment.