try to use debug to access ansible facts from molecule
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
603eeca7b5
commit
9772748b17
@ -1,5 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
import yaml
|
|
||||||
|
|
||||||
import testinfra.utils.ansible_runner
|
import testinfra.utils.ansible_runner
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ def test_mosquitto_running_and_enabled(host):
|
|||||||
|
|
||||||
def test_mosquitto_socket(host):
|
def test_mosquitto_socket(host):
|
||||||
# Verify the socket is listening for HTTP traffic
|
# Verify the socket is listening for HTTP traffic
|
||||||
inventory = yaml.load(open(host.backend.ansible_inventory))
|
address = host.ansible("debug", "var=ansible_default_ipv4.address")
|
||||||
address = inventory['all']['hosts']['bind_host']['ansible_host']
|
|
||||||
assert host.socket(
|
assert host.socket(
|
||||||
"tcp://{address}:8883".format(address=address)).is_listening
|
"tcp://{address}:8883".format(address=address)).is_listening
|
||||||
|
Loading…
Reference in New Issue
Block a user