From 0182fe51736e7610d4a63fe6767d08ffe5c5938c Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Mon, 3 Mar 2025 21:20:59 +0100 Subject: ansible: add dynamic inventory & playbooks to install k3s hosts bootstrap.yml will now be used to install any configuration on new provisionned servers, based on tags given by the dynamic inventory --- ansible/roles/k8s/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ansible/roles/k8s/tasks/main.yml') diff --git a/ansible/roles/k8s/tasks/main.yml b/ansible/roles/k8s/tasks/main.yml index c784c7c..fb58c1b 100644 --- a/ansible/roles/k8s/tasks/main.yml +++ b/ansible/roles/k8s/tasks/main.yml @@ -1,4 +1,12 @@ --- - name: Include UFW tasks ansible.builtin.include_tasks: ufw.yml + +- name: Install k3s on master nodes + ansible.builtin.include_tasks: install_k3s_master.yml + when: inventory_hostname in groups['tag_k3s_master'] + +- name: Install k3s on worker nodes + ansible.builtin.include_tasks: install_k3s_worker.yml + when: inventory_hostname in groups['tag_k3s_worker'] ... -- cgit v1.2.3