From 3782c14499029fcd1b5143de66f0d114a879c497 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 10 Jun 2019 18:29:07 +0200 Subject: [PATCH] use static localhost binding for molecule --- molecule/ec2-centos-7/playbook.yml | 1 + molecule/ec2-centos-7/tests/test_default.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/molecule/ec2-centos-7/playbook.yml b/molecule/ec2-centos-7/playbook.yml index 4504962..66b39a8 100644 --- a/molecule/ec2-centos-7/playbook.yml +++ b/molecule/ec2-centos-7/playbook.yml @@ -9,6 +9,7 @@ baseurl: "http://download.fedoraproject.org/pub/epel/$releasever/$basearch/" gpgkey: "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever/" enabled: True + mosquitto_bind_address: "127.0.0.1" roles: - role: xoxys.yum diff --git a/molecule/ec2-centos-7/tests/test_default.py b/molecule/ec2-centos-7/tests/test_default.py index 9818a0b..f6cf5e0 100644 --- a/molecule/ec2-centos-7/tests/test_default.py +++ b/molecule/ec2-centos-7/tests/test_default.py @@ -22,6 +22,4 @@ def test_mosquitto_running_and_enabled(host): def test_mosquitto_socket(host): # Verify the socket is listening for HTTP traffic - address = host.ansible("debug", "var=ansible_default_ipv4.address") - assert host.socket( - "tcp://{address}:8883".format(address=address)).is_listening + assert host.socket("tcp://127.0.0.1:8883").is_listening