This commit is contained in:
parent
1a2edc280f
commit
3f787adc0e
29
playbook.yml
29
playbook.yml
@ -142,17 +142,15 @@
|
|||||||
dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml
|
dest: /var/lib/rancher/k3s/server/manifests/kube-vip.yml
|
||||||
|
|
||||||
- name: Initial node -- Wait for ???
|
- name: Initial node -- Wait for ???
|
||||||
# ansible.builtin.pause:
|
kubernetes.core.get_info:
|
||||||
# seconds: 300
|
kind: pod
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: kubectl get pod -A
|
|
||||||
register: pod_state
|
register: pod_state
|
||||||
with_sequence: count=5
|
with_sequence: count=5
|
||||||
loop_control:
|
loop_control:
|
||||||
pause: 10
|
pause: 10
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
- ansible.builtin.debug:
|
- ansible.builtin.debug:
|
||||||
msg: "{{ pod_state | json_query('results[*].stdout') }}"
|
var: "{{ pod_state.results }}"
|
||||||
|
|
||||||
delegate_to: "{{ ansible_play_hosts[0] }}"
|
delegate_to: "{{ ansible_play_hosts[0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
@ -177,27 +175,6 @@
|
|||||||
K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token
|
K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token
|
||||||
K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}"
|
K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}"
|
||||||
|
|
||||||
rescue:
|
|
||||||
|
|
||||||
- name: Initial node -- Wait for ???
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: kubectl get pod -A
|
|
||||||
register: pod_state
|
|
||||||
with_sequence: count=5
|
|
||||||
loop_control:
|
|
||||||
pause: 10
|
|
||||||
ignore_errors: yes
|
|
||||||
- ansible.builtin.debug:
|
|
||||||
msg: "{{ pod_state | json_query('results[*].stdout') }}"
|
|
||||||
|
|
||||||
|
|
||||||
- name: Debug systemd unit
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: systemctl status k3s -l --no-pager; journalctl -u k3s.service --no-pager
|
|
||||||
register: debug
|
|
||||||
- ansible.builtin.debug:
|
|
||||||
var: debug.stdout
|
|
||||||
|
|
||||||
when: inventory_hostname != ansible_play_hosts[0]
|
when: inventory_hostname != ansible_play_hosts[0]
|
||||||
|
|
||||||
- name: Deploy applications
|
- name: Deploy applications
|
||||||
|
Loading…
Reference in New Issue
Block a user