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
Create exports structure:
file.recurse:
- name: /srv/exports
- source: salt://nfs-server/files/exports
file.directory:
- name: /srv/exports/backups
- user: root
- group: users
- file_mode: "0600"
- include_empty: True
- makedirs: True
- 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:
service.running:
- name: nfsserver
- name: nfs-server
- enable: True