Skip to content

Commit

Permalink
Update pre_req tasks (#128)
Browse files Browse the repository at this point in the history
On Rhel 8.4 ansible_distribution is set to RedHat so the current when condition will fail
Added "RedHat" to the when condition.

Signed-off-by: Razurac <[email protected]>
  • Loading branch information
razurac authored Nov 7, 2023
1 parent b1c8c06 commit 8474a8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions roles/prereq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Set SELinux to disabled state
selinux:
state: disabled
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']

- name: Enable IPv4 forwarding
sysctl:
Expand All @@ -24,21 +24,21 @@
content: "br_netfilter"
dest: /etc/modules-load.d/br_netfilter.conf
mode: "u=rw,g=,o="
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']

- name: Load br_netfilter
modprobe:
name: br_netfilter
state: present
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']

- name: Set bridge-nf-call-iptables (just to be sure)
sysctl:
name: "{{ item }}"
value: "1"
state: present
reload: yes
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
loop:
- net.bridge.bridge-nf-call-iptables
- net.bridge.bridge-nf-call-ip6tables
Expand All @@ -51,4 +51,4 @@
insertafter: EOF
path: /etc/sudoers
validate: 'visudo -cf %s'
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux']
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']

0 comments on commit 8474a8b

Please sign in to comment.