From 6d3f7f07b87990e5b2f3e9b3d074519393b4e90e Mon Sep 17 00:00:00 2001 From: djpbessems Date: Sun, 24 Apr 2022 22:32:17 +0200 Subject: [PATCH] Disable K3s installation on extra nodes --- playbook.yml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/playbook.yml b/playbook.yml index aea492b..8b0bafe 100644 --- a/playbook.yml +++ b/playbook.yml @@ -141,23 +141,6 @@ src: kube-vip.j2 dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml - - name: Initial node -- Wait for ??? - kubernetes.core.k8s_info: - kind: pod - register: pod_state - with_sequence: count=5 - loop_control: - pause: 10 - ignore_errors: yes - delegate_to: localhost - - ansible.builtin.debug: - var: "{{ pod_state.results }}" - - - name: Pause to allow k3s to initialize fully - ansible.builtin.pause: - seconds: 300 - - delegate_to: "{{ ansible_play_hosts[0] }}" run_once: true @@ -172,16 +155,16 @@ retries: 3 delay: 30 - - block: + # - block: - - name: Additional nodes -- Install K3s binary - ansible.builtin.shell: - cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage" - environment: - K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token - K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" + # - name: Additional nodes -- Install K3s binary + # ansible.builtin.shell: + # cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage" + # environment: + # K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token + # K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" - when: inventory_hostname != ansible_play_hosts[0] + # when: inventory_hostname != ansible_play_hosts[0] - name: Deploy applications hosts: localhost