initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
- name: Disable swap
|
||||
command: swapoff -a
|
||||
changed_when: false
|
||||
|
||||
- name: Remove swap from fstab
|
||||
replace:
|
||||
path: /etc/fstab
|
||||
regexp: '^(.*\s+swap\s+.*)$'
|
||||
replace: '# \1'
|
||||
|
||||
- name: Load kernel modules config
|
||||
copy:
|
||||
dest: /etc/modules-load.d/k8s.conf
|
||||
content: |
|
||||
overlay
|
||||
br_netfilter
|
||||
|
||||
- name: Load kernel modules
|
||||
modprobe:
|
||||
name: "{{ item }}"
|
||||
loop:
|
||||
- overlay
|
||||
- br_netfilter
|
||||
|
||||
- name: Sysctl for Kubernetes
|
||||
copy:
|
||||
dest: /etc/sysctl.d/k8s.conf
|
||||
content: |
|
||||
net.bridge.bridge-nf-call-iptables = 1
|
||||
net.bridge.bridge-nf-call-ip6tables = 1
|
||||
net.ipv4.ip_forward = 1
|
||||
|
||||
- name: Apply sysctl
|
||||
command: sysctl --system
|
||||
changed_when: false
|
||||
Reference in New Issue
Block a user