1
0

begin k8s config

This commit is contained in:
michael 2022-10-31 02:25:47 +13:00
parent 4abb4a929f
commit 7662f4a11f
2 changed files with 22 additions and 1 deletions

View File

@ -2,6 +2,6 @@
- name: configure control plane - name: configure control plane
hosts: k8s_control hosts: k8s_control
gather_facts: true gather_facts: true
become: false become: true
roles: roles:
- k8s_control - k8s_control

View File

@ -1 +1,22 @@
--- ---
- name: create containerd config dir
ansible.builtin.file:
path: /etc/containerd
state: directory
owner: root
group: root
mode: 0664
- name: create containerd default config
ansible.builtin.shell:
cmd: |
containerd config default > /etc/containerd/config.toml
creates: /etc/containerd/config.toml
- name: enable systemd cgroups in containerd config
ansible.builtin.lineinfile:
path: /etc/containerd/config.toml
regexp: '^(.*)SystemdCgroup = false$'
line: ' SystemdCgroup = true'
backrefs: true
state: present