diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-09 22:23:27 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-10 11:56:24 +0200 |
commit | 3de6b268ec01ed4afa243fc3522f404e88834fd8 (patch) | |
tree | a06d0c9104cc6cc3fa1a5b84691ca96c7b322e5e | |
parent | v0.0.7 (diff) | |
download | infra-ansible-3de6b268ec01ed4afa243fc3522f404e88834fd8.tar.gz infra-ansible-3de6b268ec01ed4afa243fc3522f404e88834fd8.zip |
cloud_init_wait: wait for SSH connection first
-rw-r--r-- | roles/cloud_init_wait/tasks/main.yml | 8 |
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 }}' |