From f3155391b561bee41939bc2b72dbfa804cdcfac4 Mon Sep 17 00:00:00 2001 From: Jan Benedikt Date: Mon, 10 Feb 2020 16:06:37 +0100 Subject: Adding Ubuntu support in Ansible - nfs role Extending ansible playbooks of ubuntu support. Creating new test with Ubuntu image for Molecule in nfs role. Issue-ID: OOM-1671 Signed-off-by: Jan Benedikt Change-Id: Ib1c85e4df7ec2ba547a20684ed5e23e097351df2 --- ansible/roles/nfs/molecule/default/tests/test_nfs-server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ansible/roles/nfs/molecule/default/tests/test_nfs-server.py') diff --git a/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py b/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py index 88ba0a61..e35e21c3 100644 --- a/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py +++ b/ansible/roles/nfs/molecule/default/tests/test_nfs-server.py @@ -20,9 +20,14 @@ def test_svc(host, svc): def test_exports(host): + os = host.system_info.distribution + if (os == "centos"): + host_file = "/etc/exports.d/dockerdata-nfs.exports" + elif (os == "ubuntu"): + host_file = "/etc/exports" node2_ip = testinfra.get_host("docker://kubernetes-node-2").interface( "eth0").addresses[0] - f = host.file("/etc/exports.d/dockerdata-nfs.exports") + f = host.file(host_file) assert f.exists assert f.content_string == \ """/dockerdata-nfs """ + node2_ip + """(rw,sync,no_root_squash,no_subtree_check)""" # noqa: E501 -- cgit 1.2.3-korg