try to use debug to access ansible facts from molecule
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-06-10 18:18:20 +02:00
parent 603eeca7b5
commit 9772748b17

View File

@ -1,5 +1,4 @@
import os
import yaml
import testinfra.utils.ansible_runner
@ -23,7 +22,6 @@ def test_mosquitto_running_and_enabled(host):
def test_mosquitto_socket(host):
# Verify the socket is listening for HTTP traffic
inventory = yaml.load(open(host.backend.ansible_inventory))
address = inventory['all']['hosts']['bind_host']['ansible_host']
address = host.ansible("debug", "var=ansible_default_ipv4.address")
assert host.socket(
"tcp://{address}:8883".format(address=address)).is_listening