Skip to content

Commit

Permalink
Skip package installations for bootc
Browse files Browse the repository at this point in the history
This change skips any calls to dnf on bootc nodes since they are expected to fail.

Signed-off-by: Brendan Shephard <[email protected]>
  • Loading branch information
bshephar committed Jan 21, 2025
1 parent 26bb855 commit c706708
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions roles/edpm_bootstrap/tasks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

- name: Include packages tasks
ansible.builtin.include_tasks: packages.yml
when: not bootc
when: not ansible_local.bootc

- name: Import common post packages tasks
ansible.builtin.import_tasks: bootstrap-common-post-packages.yml

- name: Include swap tasks
ansible.builtin.include_tasks: swap.yml
when: not bootc
when: not ansible_local.bootc

- name: Import FIPS tasks
ansible.builtin.import_tasks: fips.yml
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_bootstrap/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- name: Install and enable network service
when:
- (edpm_bootstrap_legacy_network_packages | length) > 0
- not ansible_local.bootc
become: true
block:
- name: Deploy network-scripts required for deprecated network service
Expand Down
4 changes: 3 additions & 1 deletion roles/edpm_kernel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
name: "{{ edpm_kernel_extra_packages }}"
state: present
register: _install_packages_result
when: edpm_kernel_extra_packages | length > 0
when:
- edpm_kernel_extra_packages | length > 0
- not ansible_local.bootc
until: _install_packages_result is succeeded
retries: "{{ edpm_kernel_download_retries }}"
delay: "{{ edpm_kernel_download_delay }}"
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_libvirt/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
delay: "{{ edpm_libvirt_download_delay }}"
notify:
- Restart libvirt
when: not ansible_local.bootc

- name: Ensure monolithic libvirt and tcp socket activation is not enabled or running
tags:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_logrotate_crond/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
until: edpm_logrotate_crond_cronie_package_download is succeeded
retries: "{{ edpm_logrotate_crond_download_retries }}"
delay: "{{ edpm_logrotate_crond_download_delay }}"
when: not ansible_local.bootc

- name: Gather SELinux fact if needed
when:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_network_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
until: nm_ovs_status is succeeded
retries: "{{ edpm_network_config_download_retries }}"
delay: "{{ edpm_network_config_download_delay }}"
when: not ansible_local.bootc
- name: Restart NetworkManager after plugin installation [nmstate]
ansible.builtin.systemd:
name: NetworkManager
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_network_config/tasks/network_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
until: edpm_network_config_onc_download is succeeded
retries: "{{ edpm_network_config_download_retries }}"
delay: "{{ edpm_network_config_download_delay }}"
when: not ansible_local.bootc

- name: Ensure /var/lib/edpm-config directory exists
become: true
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_nvmeof/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
ansible.builtin.package:
name: nvme-cli
state: present
when: not ansible_local.bootc
1 change: 1 addition & 0 deletions roles/edpm_ovs/tasks/download_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
until: _install_packages_result is succeeded
retries: "{{ edpm_ovs_download_retries }}"
delay: "{{ edpm_ovs_download_delay }}"
when: not ansible_local.bootc
1 change: 1 addition & 0 deletions roles/edpm_ovs/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
until: edpm_ovs_package_install is succeeded
retries: "{{ edpm_ovs_download_retries }}"
delay: "{{ edpm_ovs_download_delay }}"
when: not ansible_local.bootc

- name: Ensure ovs services are enabled and running
tags:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_podman/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
until: edpm_podman_package_download is succeeded
retries: "{{ edpm_podman_download_retries }}"
delay: "{{ edpm_podman_download_delay }}"
when: not ansible_local.bootc

- name: Ensure we get the ansible interfaces facts
when:
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_reboot/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
become: true
ansible.builtin.dnf:
name: yum-utils
when: not ansible_local.bootc

- name: Check if reboot is required with needs-restarting
ansible.builtin.command: needs-restarting -r
Expand Down
1 change: 1 addition & 0 deletions roles/edpm_sshd/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
until: _sshd_install_result is succeeded
retries: "{{ edpm_sshd_download_retries }}"
delay: "{{ edpm_sshd_download_delay }}"
when: not ansible_local.bootc

# NOTE(mwhahaha): we need this here because in order to validate our generated
# config, we need to ensure the host keys exist
Expand Down

0 comments on commit c706708

Please sign in to comment.