diff options
Diffstat (limited to 'roles/nfs/templates')
-rw-r--r-- | roles/nfs/templates/exports.j2 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/nfs/templates/exports.j2 b/roles/nfs/templates/exports.j2 new file mode 100644 index 0000000..301bb45 --- /dev/null +++ b/roles/nfs/templates/exports.j2 @@ -0,0 +1,11 @@ +{% set _opts = 'rw,sync,insecure,no_subtree_check' %} +{% if nfs_opts %} + {% set _opts %}{{ _opts }},{{ nfs_opts }}{% endset %} +{% endif %} +{% if nfs_all_squash %} + {% set _anonuid = nfs_anonuid if nfs_anonuid is defined else ansible_facts['user_uid'] %} + {% set _anongid = nfs_anongid if nfs_anongid is defined else ansible_facts['user_gid'] %} + {% set _opts %}{{ _opts }},all_squash,anonuid={{ _anonuid }},anongid={{ _anongid }}{% endset %} +{% endif %} + +{{ nfs_dir }} *({{ _opts }}) |