From 20d8e8e7a214c1100ec01962b658cfe9cf4a5ed3 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Thu, 24 Nov 2022 16:22:44 +0100 Subject: [PATCH] add required packages --- linux/k3s/master/tasks/main.yml | 9 +++++++++ linux/k3s/node/tasks/main.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/linux/k3s/master/tasks/main.yml b/linux/k3s/master/tasks/main.yml index cc2bb88..64e2986 100644 --- a/linux/k3s/master/tasks/main.yml +++ b/linux/k3s/master/tasks/main.yml @@ -1,3 +1,12 @@ +- name: Install or update required packages + package: + name: "{{ item }}" + state: latest + loop: + - apparmor + - apparmor-utils + become: yes + - name: run cluster init on first node shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_master_token }} sh -s - server --cluster-init" when: k3s_bootstrap diff --git a/linux/k3s/node/tasks/main.yml b/linux/k3s/node/tasks/main.yml index 30c7d14..2da4d7f 100644 --- a/linux/k3s/node/tasks/main.yml +++ b/linux/k3s/node/tasks/main.yml @@ -1,3 +1,12 @@ +- name: Install or update required packages + package: + name: "{{ item }}" + state: latest + loop: + - apparmor + - apparmor-utils + become: yes + - name: join node to cluster shell: "curl -sfL https://get.k3s.io | K3S_TOKEN={{ k3s_node_token }} sh -s - server --server https://{{ k3s_master_address }}:6443 && sleep 5" when: k3s_bootstrap