test address binding in molecule
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-06-10 17:58:33 +02:00
parent e876342887
commit e3ecb66a70

View File

@ -22,6 +22,7 @@ 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
ansible_vars = host.ansible.get_variables() inventory = yaml.load(open(host.backend.ansible_inventory))
assert host.socket("tcp://{}:8883".format( address = inventory['all']['hosts']['bind_host']['ansible_host']
ansible_vars['ansible_default_ipv4']['address'])).is_listening assert host.socket(
"tcp://{address}:8883".format(address=address).is_listening