From ee9a624949497a4a3944b24e1b3d9c192dd3d444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 7 Dec 2021 20:23:00 +0000 Subject: roles: Add nfsd role for virtual machines --- roles/nfsd/templates/exports.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 roles/nfsd/templates/exports.j2 (limited to 'roles/nfsd/templates') diff --git a/roles/nfsd/templates/exports.j2 b/roles/nfsd/templates/exports.j2 new file mode 100644 index 0000000..78ee61f --- /dev/null +++ b/roles/nfsd/templates/exports.j2 @@ -0,0 +1,8 @@ +# managed by Ansible + +{% for host in groups.servers %} +{% if host in nfsd_shared_dirs %} +{% set h = hostvars[host] %} +{{ nfsd_data_dir }}/{{ h.inventory_hostname }} -maproot=root {{ h.__ip.internal if h.__ip.internal is defined }} {{ h.__ip.external if h.__ip.external is defined }} +{% endif %} +{% endfor %} -- cgit v1.2.3