# Provision a newly built server

- hosts: all
  gather_facts: False

  tasks:
    - name: Wait for server to be alive
      local_action: wait_for port=22 host="{{ ansible_ssh_host | default(inventory_hostname) }}" search_regex=OpenSSH delay=10
      become: no

- include: playbook.yml

# Provision a newly built server

- hosts: all
  gather_facts: False

  tasks:
    - name: Wait for server to be alive
      local_action: wait_for port=22 host="{{ ansible_ssh_host | default(inventory_hostname) }}" search_regex=OpenSSH delay=10
      become: no

- include: playbook.yml
- include: reboot-patch.yml

Patch host and reboot on build
Patch host and reboot on build
