From 38f8dd96e1d930b8b27ac75dd8540d88bf448477 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 20 Apr 2022 16:54:56 +0200 Subject: [PATCH] Improve task naming --- playbook.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/playbook.yml b/playbook.yml index 1831998..5cc8014 100644 --- a/playbook.yml +++ b/playbook.yml @@ -100,51 +100,48 @@ - cluster.k3s.yml tasks: - - name: Initial node - block: + - block: - - name: Install K3s binary + - name: \[Initial node\] Install K3s binary ansible.builtin.shell: cmd: "curl -sfL https://get.k3s.io | sh -s - server --cluster-init --disable local-storage,traefik --tls-san {{ cluster.virtualip | ansible.utils.ipaddr('address') }}" - - name: Retrieve token + - name: \[Initial node\] Retrieve token ansible.builtin.slurp: src: /var/lib/rancher/k3s/server/token register: k3s_token - - name: Store token + - name: \[Initial node\] Store token ansible.builtin.set_fact: clustertoken: "{{ k3s_token.content | b64decode | trim }}" - - name: Install 'kube-vip' - block: + - block: - - name: Retrieve manifest for RBAC + - name: \[Install 'kube-vip'\] Retrieve manifest for RBAC ansible.builtin.uri: url: https://kube-vip.io/manifests/rbac.yaml return_content: yes register: manifest_rbac - - name: Pull image + - name: \[Install 'kube-vip'\] Pull image ansible.builtin.shell: cmd: ctr image pull ghcr.io/kube-vip/kube-vip:latest - - name: Generate manifest for daemonSet + - name: \[Install 'kube-vip'\] Generate manifest for daemonSet ansible.builtin.shell: cmd: "ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:latest vip /kube-vip manifest daemonset --interface {{ ansible_default_ipv4.interface }} --address {{ cluster.virtualip | ansible.utils.ipaddr('address') }} --inCluster --taint --controlplane --services --arp --leaderElection" register: manifest_daemonset - - name: Inject manifest for installation + - name: \[Install 'kube-vip'\] Inject manifest for installation ansible.builtin.template: src: kube-vip.j2 dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml when: inventory_hostname == ansible_play_hosts[0] - - name: Additional nodes - block: + - block: - - name: Install K3s binary + - name: \[Additional nodes\] Install K3s binary ansible.builtin.shell: cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage,traefik" environment: