diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-09 18:15:52 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-09 18:23:16 +0200 |
commit | c7c594671a75a9e846818433edcd09deadb92698 (patch) | |
tree | 432f896077a7dc9545434e50c3ad2b849005bd93 | |
parent | v0.0.6 (diff) | |
download | infra-ansible-c7c594671a75a9e846818433edcd09deadb92698.tar.gz infra-ansible-c7c594671a75a9e846818433edcd09deadb92698.zip |
add cloud_init_wait role
-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 |