wait-for-host: PB to wait for a host to come up

This playbook just waits for a machine to become available.  It's useful
when running Ansible immediately after creating a new machine.
frigate-exporter
Dustin 2024-06-29 07:57:59 -05:00
parent 5958904fa3
commit d8472c64a2
1 changed files with 10 additions and 0 deletions

10
wait-for-host.yml Normal file
View File

@ -0,0 +1,10 @@
- hosts: all
gather_facts: false
tasks:
- name: wait for host to come up
become: false
delegate_to: localhost
connection: local
wait_for:
host: '{{ ansible_host | d(inventory_hostname) }}'
port: '{{ ansible_port | d(22) }}'