diff options
Diffstat (limited to 'roles/cloud_init_wait/tasks')
-rw-r--r-- | roles/cloud_init_wait/tasks/main.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/cloud_init_wait/tasks/main.yml b/roles/cloud_init_wait/tasks/main.yml new file mode 100644 index 0000000..4a69f60 --- /dev/null +++ b/roles/cloud_init_wait/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Wait until cloud-init is finished + ansible.builtin.stat: + path: /var/lib/cloud/instance/boot-finished + # WTF? Is this the best way to _just_ check if a file exists? + get_attributes: false + get_checksum: false + get_mime: false + register: boot_finished + until: boot_finished.stat.exists is not false + # About 5 minutes worth of attempts. + retries: 30 + delay: 10 |