Skip to content
Snippets Groups Projects
Commit 2b10d43f authored by Matthias Riegler's avatar Matthias Riegler
Browse files

CentOS/RHEL compatibility for Ansible roles

- Setting IPv4 & IPv6 forwarding
- Setting `sysctl:net.bridge.bridge-nf-call-iptables` and `bridge-nf-call-ip6tables` to enabled since it is disabled by default on some CentOS systems
parent 830a191a
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a
- [X] Debian
- [ ] Ubuntu
- [ ] CentOS
- [X] CentOS
on processor architecture:
......
---
- name: Set SELinux to disabled state
selinux:
state: disabled
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
- name: Enable IPv4 forwarding
sysctl:
name: net.ipv4.ip_forward
value: "1"
state: present
reload: yes
- name: Enable IPv6 forwarding
sysctl:
name: net.ipv6.conf.all.forwarding
value: "1"
state: present
reload: yes
- name: Set bridge-nf-call-iptables (just to be sure)
sysctl:
name: net.bridge.bridge-nf-call-iptables
value: "1"
state: present
reload: yes
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
- name: Set bridge-nf-call-ip6tables (just to be sure)
sysctl:
name: net.bridge.bridge-nf-call-iptables
value: "1"
state: present
reload: yes
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
......@@ -4,6 +4,7 @@
gather_facts: yes
become: yes
roles:
- { role: prereq }
- { role: download }
- { role: raspbian }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment