Disable K3s installation on extra nodes
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
d7e300df54
commit
6d3f7f07b8
33
playbook.yml
33
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
|
||||
|
Loading…
Reference in New Issue
Block a user