---
- name: Wait for Cloud Init to finish
  command: 'cloud-init status --wait'

- name: Wait for SSH to be available
  ansible.builtin.shell: systemctl is-active ssh
  register: result
  until: result.stdout.strip() == "active"
  retries: 50
  delay: 2
