From 4a231dc838f800c7ca088cecfc503cdbd0ebbf16 Mon Sep 17 00:00:00 2001 From: John Ratliff Date: Thu, 9 May 2024 10:48:51 +0000 Subject: [PATCH] combine roles Use one play for both roles since the targets are the same Fact gathering disabled because it's slow and not needed for anything in the roles --- Ansible/Playbooks/RKE2/site.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Ansible/Playbooks/RKE2/site.yaml b/Ansible/Playbooks/RKE2/site.yaml index d885cbb..fe833c6 100644 --- a/Ansible/Playbooks/RKE2/site.yaml +++ b/Ansible/Playbooks/RKE2/site.yaml @@ -13,16 +13,11 @@ # bootstraps first server and copies configs for others/agents - name: Prepare all nodes - hosts: servers,agents - gather_facts: true # enables us to gather lots of useful variables: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html + hosts: rke2 + gather_facts: false # fact gathering is slow and not needed for any of our tasks + become: true roles: - prepare-nodes - -# creates directories for download and then downloads RKE2 and changes permissions -- name: Download RKE2 - hosts: servers,agents - gather_facts: true - roles: - rke2-download # Creates RKE2 bootstrap manifests folder and copies kube-vip template over (configured with variables)