This commit is contained in:
jonas 2021-11-06 12:24:49 +01:00
parent 8783236da8
commit 5ee94083bd

View File

@ -6,18 +6,22 @@ Install NFS server packages:
- yast2-nfs-server - yast2-nfs-server
Create exports structure: Create exports structure:
file.recurse: file.directory:
- name: /srv/exports - name: /srv/exports/backups
- source: salt://nfs-server/files/exports
- user: root - user: root
- group: users - group: users
- file_mode: "0600"
- include_empty: True
- makedirs: True - makedirs: True
- dir_modes: "0755" - dir_modes: "0755"
Add backups exports:
file.replace:
- name: /etc/exports
- pattern: "/srv/exports/backups {{ pillar['network']['ip'] }}/24(rw,no_root_squash,sync,no_subtree_check)"
- repl: "/srv/exports/backups {{ pillar['network']['ip'] }}/24(rw,no_root_squash,sync,no_subtree_check)"
- append_if_not_found: True
Start nfs-server: Start nfs-server:
service.running: service.running:
- name: nfsserver - name: nfs-server
- enable: True - enable: True