Skip to content

Commit

Permalink
Use local custom fact for bootc
Browse files Browse the repository at this point in the history
Signed-off-by: Brendan Shephard <[email protected]>
  • Loading branch information
bshephar committed Dec 16, 2024
1 parent f6892da commit 56bf7e4
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions playbooks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
name: osp.edpm.edpm_kernel
tags:
- edpm_kernel
when: not bootc
when: not ansible_local.bootc
- name: Import edpm_tuned
ansible.builtin.import_role:
name: osp.edpm.edpm_tuned
Expand All @@ -54,11 +54,11 @@
tasks_from: kernelargs.yml
tags:
- edpm_kernel
when: not bootc
when: not ansible_local.bootc
- name: Configure KSM for kernel
ansible.builtin.import_role:
name: osp.edpm.edpm_kernel
tasks_from: ksm.yml
tags:
- edpm_kernel
when: not bootc
when: not ansible_local.bootc
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
2 changes: 1 addition & 1 deletion roles/edpm_bootstrap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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

- name: Import bootstrap tasks
ansible.builtin.import_tasks: bootstrap.yml
2 changes: 1 addition & 1 deletion roles/edpm_kernel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
register: _install_packages_result
when:
- edpm_kernel_extra_packages | length > 0
- not bootc
- not ansible_local.bootc
until: _install_packages_result is succeeded
retries: "{{ edpm_kernel_download_retries }}"
delay: "{{ edpm_kernel_download_delay }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_libvirt/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
delay: "{{ edpm_libvirt_download_delay }}"
notify:
- Restart libvirt
when: not bootc
when: not ansible_local.bootc

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

- name: Gather SELinux fact if needed
when:
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_network_config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- name: Configure network with network role from system roles [nmstate]
when:
- edpm_network_config_tool == 'nmstate'
- not bootc
- not ansible_local.bootc
become: true
block:
- name: Install OVS NetworkManager plugin [nmstate]
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_network_config/tasks/network_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
until: edpm_network_config_onc_download is succeeded
retries: "{{ edpm_network_config_download_retries }}"
delay: "{{ edpm_network_config_download_delay }}"
when: not bootc
when: not ansible_local.bootc

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

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

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

- name: Check if reboot is required with needs-restarting
ansible.builtin.command: needs-restarting -r
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_sshd/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
retries: "{{ edpm_sshd_download_retries }}"
delay: "{{ edpm_sshd_download_delay }}"
when:
- not bootc
- 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
4 changes: 2 additions & 2 deletions roles/edpm_telemetry/tasks/exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
edpm_container_manage_healthcheck_disabled: true
edpm_container_manage_config_patterns: "{{ exporter }}.json"
edpm_container_manage_clean_orphans: false
when: not bootc
when: not ansible_local.bootc

- name: Restart exporter container
become: true
ansible.builtin.systemd:
state: restarted
name: "edpm_{{ exporter }}.service"
when: not bootc
when: not ansible_local.bootc

- name: Deploy exporter container - bootc
ansible.builtin.systemd_service:
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_tuned/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

- name: Install packages
ansible.builtin.include_tasks: install.yml
when: not bootc
when: not ansible_local.bootc

- name: Configure tuned
ansible.builtin.include_tasks: configure.yml
Expand Down

0 comments on commit 56bf7e4

Please sign in to comment.