Skip to content

Commit 27ac9b1

Browse files
committed
Check if the bootc fact exits before evaluating
Sometimes these roles are used without the bootstrap role and we should add the check if the bootc fact has been defined to the conditions to avoid backward incompatibility. Jira: https://issues.redhat.com/browse/OSPCIX-1058 Signed-off-by: rabi <[email protected]>
1 parent 5a1d380 commit 27ac9b1

File tree

18 files changed

+20
-20
lines changed

18 files changed

+20
-20
lines changed

playbooks/configure_ovs_dpdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ansible.builtin.dnf:
1818
name: openvswitch
1919
state: present
20-
when: not ansible_local.bootc
20+
when: ansible_local.bootc is not defined or not ansible_local.bootc
2121

2222
- name: Configure OvS DPDK configs
2323
ansible.builtin.import_role:

roles/edpm_bootstrap/tasks/bootstrap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
- name: Include packages tasks
6868
ansible.builtin.include_tasks: packages.yml
69-
when: not ansible_local.bootc
69+
when: ansible_local.bootc is not defined or not ansible_local.bootc
7070

7171
- name: Set selinux state
7272
ansible.posix.selinux:

roles/edpm_bootstrap/tasks/fips.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
- name: Change FIPS status
4141
when:
4242
- edpm_bootstrap_fips_mode != 'check'
43-
- not ansible_local.bootc
43+
- ansible_local.bootc is not defined or not ansible_local.bootc
4444
- >
4545
edpm_bootstrap_fips_mode !=
4646
edpm_bootstrap_fips_fms_status |

roles/edpm_download_cache/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
ansible.builtin.include_tasks: packages.yml
3232
when:
3333
- edpm_download_cache_packages | bool
34-
- not ansible_local.bootc
34+
- ansible_local.bootc is not defined or not ansible_local.bootc
3535

3636
- name: Download container images
3737
ansible.builtin.include_tasks: container_images.yml

roles/edpm_kernel/tasks/kernelargs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
when:
7575
- set_kernel_args is defined
7676
- set_kernel_args is true
77-
- not ansible_local.bootc
77+
- ansible_local.bootc is not defined or not ansible_local.bootc
7878
block:
7979

8080
- name: Check if the kernelargs entry is already present in the file

roles/edpm_kernel/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
register: _install_packages_result
3737
when:
3838
- edpm_kernel_extra_packages | length > 0
39-
- not ansible_local.bootc
39+
- ansible_local.bootc is not defined or not ansible_local.bootc
4040
until: _install_packages_result is succeeded
4141
retries: "{{ edpm_kernel_download_retries }}"
4242
delay: "{{ edpm_kernel_download_delay }}"
@@ -45,7 +45,7 @@
4545
ansible.builtin.dnf:
4646
name: 'dracut-config-generic'
4747
state: absent
48-
when: not ansible_local.bootc
48+
when: ansible_local.bootc is not defined or not ansible_local.bootc
4949

5050
- name: Ensure the /etc/modules-load.d/ directory exists
5151
ansible.builtin.file:

roles/edpm_libvirt/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
delay: "{{ edpm_libvirt_download_delay }}"
2323
notify:
2424
- Restart libvirt
25-
when: not ansible_local.bootc
25+
when: ansible_local.bootc is not defined or not ansible_local.bootc
2626

2727
- name: Ensure monolithic libvirt and tcp socket activation is not enabled or running
2828
tags:

roles/edpm_network_config/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- name: Install required packages
2727
ansible.builtin.import_tasks: package_management.yml
2828
when:
29-
- not ansible_local.bootc
29+
- ansible_local.bootc is not defined or not ansible_local.bootc
3030

3131
- name: Configure network with nmstate tool
3232
when: edpm_network_config_tool == 'nmstate'

roles/edpm_network_config/tasks/pre_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
name: osp.edpm.edpm_bootstrap
5050
tasks_from: "packages.yml"
5151
when:
52-
- not ansible_local.bootc
52+
- ansible_local.bootc is not defined or not ansible_local.bootc
5353

5454
- name: Ensure /var/lib/edpm-config directory exists
5555
become: true

roles/edpm_nvmeof/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@
3838
ansible.builtin.package:
3939
name: nvme-cli
4040
state: present
41-
when: not ansible_local.bootc
41+
when: ansible_local.bootc is not defined or not ansible_local.bootc

0 commit comments

Comments
 (0)