Set default address to wait for

Seems that ansible_default_ipv4 doesn't always has address key,
so we're setting module default 127.0.0.1 for this case.

Change-Id: I506ba4fc6b134ef0b389a2647fe22ae6b1a17ace
This commit is contained in:
Dmitriy Rabotjagov 2019-04-05 07:49:00 +03:00 committed by Dmitriy Rabotjagov (noonedeadpunk)
parent ca2f31bc43
commit 1d316057a0

View File

@ -28,7 +28,7 @@
- name: Wait for web server to complete starting
wait_for:
host: "{{ ansible_default_ipv4.address }}"
host: "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
port: "{{ item }}"
timeout: 25
delay: 10