Reorganize task file to work
This commit is contained in:
parent
753629ace9
commit
3f63552357
1 changed files with 18 additions and 18 deletions
|
|
@ -12,24 +12,6 @@
|
||||||
- name: Enable containerd on boot
|
- name: Enable containerd on boot
|
||||||
service: name=containerd state=started enabled=yes
|
service: name=containerd state=started enabled=yes
|
||||||
|
|
||||||
- sysctl:
|
|
||||||
name: "{{ item }}"
|
|
||||||
value: 1
|
|
||||||
sysctl_file: /etc/sysctl.d/99-kubernetes-cri.conf
|
|
||||||
reload: yes
|
|
||||||
with_items:
|
|
||||||
- "net.bridge.bridge-nf-call-iptables"
|
|
||||||
- "net.ipv4.ip_forward"
|
|
||||||
- "net.bridge.bridge-nf-call-ip6tables"
|
|
||||||
|
|
||||||
- name: Load kernel module
|
|
||||||
modprobe:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- br_netfilter
|
|
||||||
- overlay
|
|
||||||
|
|
||||||
- name: Configuring kernel module to be load on boot
|
- name: Configuring kernel module to be load on boot
|
||||||
template:
|
template:
|
||||||
src: "etc/modules-load.d/{{ item }}.conf.j2"
|
src: "etc/modules-load.d/{{ item }}.conf.j2"
|
||||||
|
|
@ -41,6 +23,24 @@
|
||||||
- "br_netfilter"
|
- "br_netfilter"
|
||||||
- "overlay"
|
- "overlay"
|
||||||
|
|
||||||
|
- name: Load kernel module
|
||||||
|
modprobe:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- br_netfilter
|
||||||
|
- overlay
|
||||||
|
|
||||||
|
- sysctl:
|
||||||
|
name: "{{ item }}"
|
||||||
|
value: "1"
|
||||||
|
sysctl_file: /etc/sysctl.d/99-kubernetes-cri.conf
|
||||||
|
reload: yes
|
||||||
|
with_items:
|
||||||
|
- "net.bridge.bridge-nf-call-iptables"
|
||||||
|
- "net.ipv4.ip_forward"
|
||||||
|
- "net.bridge.bridge-nf-call-ip6tables"
|
||||||
|
|
||||||
- name: Ensuring /etc/containerd folder exists
|
- name: Ensuring /etc/containerd folder exists
|
||||||
file:
|
file:
|
||||||
path: "/etc/containerd"
|
path: "/etc/containerd"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue