From b58f2c447a93e69b18a753d179078b615bf0a30b Mon Sep 17 00:00:00 2001 From: Sascha Girrulat Date: Tue, 30 May 2023 10:30:41 +0200 Subject: [PATCH] fix: Ensure role label on nodes it is generally more pleasant to set these roles. --- roles/k3s/post/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/k3s/post/tasks/main.yml b/roles/k3s/post/tasks/main.yml index 84a79dba..76923432 100644 --- a/roles/k3s/post/tasks/main.yml +++ b/roles/k3s/post/tasks/main.yml @@ -6,3 +6,9 @@ file: path: /tmp/k3s state: absent + +- name: Ensure worker role on nodes + ansible.builtin.command: + cmd: "k3s kubectl label node {{ item }} node-role.kubernetes.io/worker=worker" + run_once: true + with_items: "{{ groups['node'] }}"