Skip to content

Commit

Permalink
chore: increase timeout for token wait
Browse files Browse the repository at this point in the history
  • Loading branch information
ayr-ton committed Oct 20, 2024
1 parent 43b9e33 commit c05ca32
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,36 @@
wait_for:
path: /var/lib/rancher/k3s/server/token
state: present
timeout: 300
timeout: 600
when: inventory_hostname == groups['all'][0]
run_once: true

- name: Debug - Check if token file exists
stat:
path: /var/lib/rancher/k3s/server/token
register: token_file_stat
when: inventory_hostname == groups['all'][0]
run_once: true

- name: Debug - Display token file status
debug:
var: token_file_stat
when: inventory_hostname == groups['all'][0]
run_once: true

- name: Ensure cluster token is captured from control node
slurp:
src: /var/lib/rancher/k3s/server/token
register: k3s_token
when: inventory_hostname == groups['all'][0]
when:
- inventory_hostname == groups['all'][0]
- token_file_stat.stat.exists
run_once: true

- name: Debug - Display token content
debug:
var: k3s_token
when: inventory_hostname == groups['all'][0]
when:
- inventory_hostname == groups['all'][0]
- token_file_stat.stat.exists
run_once: true

0 comments on commit c05ca32

Please sign in to comment.