mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #854 from xvzf/ansible_centos
CentOS/RHEL compatibility for Ansible roles
This commit is contained in:
commit
0814898041
@ -8,7 +8,7 @@ Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a
|
|||||||
|
|
||||||
- [X] Debian
|
- [X] Debian
|
||||||
- [ ] Ubuntu
|
- [ ] Ubuntu
|
||||||
- [ ] CentOS
|
- [X] CentOS
|
||||||
|
|
||||||
on processor architecture:
|
on processor architecture:
|
||||||
|
|
||||||
|
35
contrib/ansible/roles/prereq/tasks/main.yml
Normal file
35
contrib/ansible/roles/prereq/tasks/main.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
- 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
|
gather_facts: yes
|
||||||
become: yes
|
become: yes
|
||||||
roles:
|
roles:
|
||||||
|
- { role: prereq }
|
||||||
- { role: download }
|
- { role: download }
|
||||||
- { role: raspbian }
|
- { role: raspbian }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user