Add NFS role
This commit is contained in:
3
roles/nfs/tasks/main.yml
Normal file
3
roles/nfs/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: nfs.yml
|
||||||
|
tags: [ nfs ]
|
||||||
20
roles/nfs/tasks/nfs.yml
Normal file
20
roles/nfs/tasks/nfs.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
- name: nfs - install
|
||||||
|
package: name=nfs-utils
|
||||||
|
|
||||||
|
- name: nfs - create mountpoints
|
||||||
|
file: "path={{ item }} owner=root group=root mode=0755 state=directory"
|
||||||
|
with_items:
|
||||||
|
- /mnt/save/daten
|
||||||
|
- /mnt/save/fotos
|
||||||
|
failed_when: False
|
||||||
|
|
||||||
|
- name: nfs - add mountpoints
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/fstab
|
||||||
|
block: |
|
||||||
|
ariane:/zv1/homes /home nfs intr,hard,rw,fsc 0 0
|
||||||
|
ariane:/zv1/daten /mnt/save/daten nfs intr,hard,rw,fsc 0 0
|
||||||
|
ariane:/zv1/fotos /mnt/save/fotos nfs intr,hard,rw,fsc 0 0
|
||||||
|
validate: "mount -a -T %s"
|
||||||
|
|
||||||
Reference in New Issue
Block a user