Skip to content

Commit efb59c6

Browse files
committed
add async for cluster deploy
1 parent cfe8e54 commit efb59c6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ocne2/deploy_ocne_oci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,24 @@
291291
chdir: ~/
292292
become: true
293293
become_user: "{{ username }}"
294-
register: provision_cluster
294+
async: 3600
295+
poll: 0
296+
register: cluster_sleeper
295297
changed_when: provision_cluster.rc == 0
296298

297299
- name: Print cluster provision output
298300
ansible.builtin.debug:
299-
var: provision_cluster
301+
var: cluster_sleeper
300302
when: debug_enabled
301303

304+
- name: Check on cluster provisioning
305+
ansible.builtin.async_status:
306+
jid: "{{ cluster_sleeper.ansible_job_id }}"
307+
register: job_result
308+
until: job_result.finished
309+
retries: 360
310+
delay: 10
311+
302312
- name: Add kubeconfig to .bashrc file
303313
ansible.builtin.lineinfile:
304314
path: ~/.bashrc

0 commit comments

Comments
 (0)