diff --git a/molecule/cluster/playbook.yml b/molecule/cluster/playbook.yml index 62127ac..b5b3c4e 100644 --- a/molecule/cluster/playbook.yml +++ b/molecule/cluster/playbook.yml @@ -6,6 +6,12 @@ - ansible-minio vars: minio_server_datadirs: - - "/test" + - "/test1" + - "/test2" + - "/test3" + - "/test4" minio_server_cluster_nodes: - - "https://172.17.0.2:9091/test" + - "http://{{ ansible_hostname }}:9091/test1" + - "http://{{ ansible_hostname }}:9091/test2" + - "http://{{ ansible_hostname }}:9091/test3" + - "http://{{ ansible_hostname }}:9091/test4" diff --git a/molecule/cluster/tests/test_minio_cluster.py b/molecule/cluster/tests/test_minio_cluster.py index 4a31134..1f125d0 100644 --- a/molecule/cluster/tests/test_minio_cluster.py +++ b/molecule/cluster/tests/test_minio_cluster.py @@ -26,7 +26,10 @@ def test_directories(host, dirs): def test_env_file(host): env_file = host.file("/etc/default/minio") - assert env_file.contains('MINIO_VOLUMES="https://172.17.0.2:9091/test"') + a = host.ansible.get_variables() + host = a['ansible_hostname'] + volume_string = "MINIO_VOLUMES=\"http://%s:9091/test1 " % (host) + assert env_file.contains(volume_string) def test_minio_service(Service):