Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions nfs/files/exports
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
# Your changes will be overwritten.
########################################################################
#
{% for dir, opts in salt['pillar.get']('nfs:server:exports', {}).items() -%}
{%- for dir, opts in salt['pillar.get']('nfs:server:exports', {}).items() %}
{%- if opts is string %}
{{ dir }} {{ opts }}
{% endfor -%}
{%- elif opts is mapping %}
{{ dir }}
{%- for host, options in opts.items() -%}
{{ ' ' ~ host }}(
{%- if options is iterable and options is not string -%}
{{ ','.join(options) }}
{%- else -%}
{{ options }}
{%- endif -%})
{%- endfor -%}
{%- endif %}
{%- endfor %}
7 changes: 7 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ nfs:
/srv/homes: >-
hostname1(rw,sync,no_subtree_check)
hostname2(ro,sync,no_subtree_check)
/srv/cats:
hostname1:
- async
- nohide
hostname2: rw
/srv/dogs:
hostname1: nohide
# FreeBSD specific:
mountd_flags: -l -S

Expand Down