gvasalt/states/nfsserver/init.sls
Jan Dittberner f5be5b7e0f Ensure that the acl package is installed
The acl package is required for running setfacl. This commit ensures that
the package is installed on NFS servers.
2020-04-04 14:48:40 +02:00

47 lines
833 B
Text

{% set nfs_root = salt['pillar.get']('nfsserver:nfsroot', '/srv/nfs4') -%}
nfs-kernel-server:
pkg:
- installed
service:
- running
- enable: True
- require:
- pkg: nfs-kernel-server
{{ nfs_root }}:
file.directory:
- user: root
- group: root
- mode: 0755
{{ nfs_root }}/mail:
file.directory:
- user: root
- group: root
- mode: 0751
- require:
- file: {{ nfs_root }}
{{ nfs_root }}/web:
file.directory:
- user: root
- group: root
- mode: 0751
- require:
- file: {{ nfs_root }}
acl:
pkg.installed
/etc/exports:
file.managed:
- user: root
- group: root
- mode: 0644
- template: jinja
- context:
nfs_root: {{ nfs_root }}
- source: salt://nfsserver/exports
- watch_in:
- service: nfs-kernel-server