aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/cloud_init_wait/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/cloud_init_wait/tasks/main.yml b/roles/cloud_init_wait/tasks/main.yml
index 5de51eb..c7ed595 100644
--- a/roles/cloud_init_wait/tasks/main.yml
+++ b/roles/cloud_init_wait/tasks/main.yml
@@ -1,3 +1,11 @@
+# Make a playbook usable immediately after creating a VM - even before
+# the SSH server is started.
+- name: Wait for SSH connection
+ ansible.builtin.wait_for_connection:
+ timeout: '{{ cloud_init_wait_seconds }}'
+
+# Again, make a playbook usable immediately after creating a VM - that includes
+# waiting until cloud-init is done.
- name: Wait until cloud-init is finished
ansible.builtin.stat:
path: '{{ cloud_init_wait_path }}'