aboutsummaryrefslogtreecommitdiffstats
path: root/roles/nfsd/templates
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:23:00 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:24:51 +0000
commitee9a624949497a4a3944b24e1b3d9c192dd3d444 (patch)
treebb4cb0bdd284368e8d3ea31f67b926274c3656a6 /roles/nfsd/templates
parent9bd2c8c17a22c84da9a6ba6407c5b928d77fb469 (diff)
downloadrules-ee9a624949497a4a3944b24e1b3d9c192dd3d444.tar.gz
roles: Add nfsd role for virtual machines
Diffstat (limited to 'roles/nfsd/templates')
-rw-r--r--roles/nfsd/templates/exports.j28
1 files changed, 8 insertions, 0 deletions
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 %}
remember that computers suck.