Make fileserver setup deterministic

Create the home directories before trying to bind mount them to /srv/nfs4
subdirectories. Remove unneeded acl parameter that lead to rewrites of
/etc/fstab for every salt run.
This commit is contained in:
Jan Dittberner 2016-09-25 13:50:53 +02:00
parent 91ed2ae12c
commit 231976d1dc

View file

@ -7,6 +7,15 @@ base-dirs:
- group: root - group: root
- mode: 0755 - mode: 0755
home-dirs:
file.directory:
- names:
- /home/mail
- /home/www
- user: root
- group: root
- mode: 0751
nfs4-dirs: nfs4-dirs:
file.directory: file.directory:
- names: - names:
@ -15,6 +24,8 @@ nfs4-dirs:
- user: root - user: root
- group: root - group: root
- mode: 0751 - mode: 0751
- require:
- file: /srv/nfs4
/srv/nfs4/web: /srv/nfs4/web:
mount.mounted: mount.mounted:
@ -22,10 +33,10 @@ nfs4-dirs:
- fstype: none - fstype: none
- opts: - opts:
- bind - bind
- acl
- persist: True - persist: True
- require: - require:
- file: nfs4-dirs - file: nfs4-dirs
- file: /home/www
/srv/nfs4/mail: /srv/nfs4/mail:
mount.mounted: mount.mounted:
@ -33,10 +44,10 @@ nfs4-dirs:
- fstype: none - fstype: none
- opts: - opts:
- bind - bind
- acl
- persist: True - persist: True
- require: - require:
- file: nfs4-dirs - file: nfs4-dirs
- file: /home/mail
/srv/sftp/home: /srv/sftp/home:
file.directory: file.directory:
@ -48,10 +59,10 @@ nfs4-dirs:
- fstype: none - fstype: none
- opts: - opts:
- bind - bind
- acl
- persist: True - persist: True
- require: - require:
- file: /srv/sftp/home - file: /srv/sftp/home
- file: /home/mail
fileserver-packages: fileserver-packages:
pkg.installed: pkg.installed: