test address binding in molecule
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2019-06-10 17:58:33 +02:00
parent e876342887
commit e3ecb66a70
1 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@ def test_mosquitto_running_and_enabled(host):
def test_mosquitto_socket(host):
# Verify the socket is listening for HTTP traffic
ansible_vars = host.ansible.get_variables()
assert host.socket("tcp://{}:8883".format(
ansible_vars['ansible_default_ipv4']['address'])).is_listening
inventory = yaml.load(open(host.backend.ansible_inventory))
address = inventory['all']['hosts']['bind_host']['ansible_host']
assert host.socket(
"tcp://{address}:8883".format(address=address).is_listening