diff --git a/kubernetes/tasks/prerequisites.yml b/kubernetes/tasks/prerequisites.yml index 74b62af..049e176 100644 --- a/kubernetes/tasks/prerequisites.yml +++ b/kubernetes/tasks/prerequisites.yml @@ -11,19 +11,9 @@ net.bridge.bridge-nf-call-iptables = 1 notify: reload_sysctl -- name: Disable swap - command: swapoff -a +- import_tasks: ./prerequisites/swap.yml -- name: Deploy containerd-config - ansible.builtin.copy: - src: containerd_config.toml - dest: /etc/containerd/config.toml - mode: u=rw,g=r,o=r - -- name: restart_containerd - ansible.builtin.service: - name: containerd - state: restarted +- import_tasks: ./prerequisites/containerd.yml - name: Set control-plane-dns-endpoint towards local-ip lineinfile: diff --git a/kubernetes/tasks/prerequisites/containerd.yml b/kubernetes/tasks/prerequisites/containerd.yml new file mode 100644 index 0000000..c032481 --- /dev/null +++ b/kubernetes/tasks/prerequisites/containerd.yml @@ -0,0 +1,10 @@ +- name: Deploy containerd-config + ansible.builtin.copy: + src: containerd_config.toml + dest: /etc/containerd/config.toml + mode: u=rw,g=r,o=r + +- name: restart_containerd + ansible.builtin.service: + name: containerd + state: restarted diff --git a/kubernetes/tasks/prerequisites/swap.yml b/kubernetes/tasks/prerequisites/swap.yml new file mode 100644 index 0000000..ae5a289 --- /dev/null +++ b/kubernetes/tasks/prerequisites/swap.yml @@ -0,0 +1,2 @@ +- name: Disable swap + command: swapoff -a