diff --git a/roles/mail_server/molecule/default/tests/test_optional.py b/roles/mail_server/molecule/default/tests/test_optional.py index e7256af58e03c1515878bc2a1ce54a124e8442b1..15d96912ff00f2fc769c65358982d1fa8584890b 100644 --- a/roles/mail_server/molecule/default/tests/test_optional.py +++ b/roles/mail_server/molecule/default/tests/test_optional.py @@ -1,10 +1,11 @@ +import os import re import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - '.molecule/ansible_inventory.yml').get_hosts('parameters-optional') + os.environ['MOLECULE_INVENTORY_FILE']).get_hosts(['parameters-optional']) def test_smtp_tls_files(host):