28 lines
691 B
Plaintext
28 lines
691 B
Plaintext
Install NFS server packages:
|
|
pkg.installed:
|
|
- pkgs:
|
|
- nfs-kernel-server
|
|
- yast2-nfs-common
|
|
- yast2-nfs-server
|
|
|
|
Create exports structure:
|
|
file.directory:
|
|
- name: /srv/exports/backups
|
|
- user: root
|
|
- group: users
|
|
- 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: nfs-server
|
|
- enable: True
|