This commit is contained in:
parent
8557db5e89
commit
1847a5a698
1 changed files with 24 additions and 0 deletions
24
roles/nfs-client/tasks/main.yml
Normal file
24
roles/nfs-client/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
# Install NFS client, mount distant storage and add configuration to fstab to make it persistent
|
||||
- name: Install NFS client
|
||||
apt:
|
||||
name:
|
||||
- nfs-common # use this on any NFS machine, be either client or server
|
||||
update_cache: true
|
||||
|
||||
- name: Create mountable dir
|
||||
file:
|
||||
path: {{ nfs-mount-path }}
|
||||
state: directory
|
||||
mode: 0644
|
||||
owner: {{ nfs-dir-owner }}
|
||||
group: {{ nfs-dir-group }}
|
||||
|
||||
- name: Mount and add to fstab
|
||||
mount:
|
||||
state: mounted # actively mounted and configured in fstab
|
||||
src: {{ nfs-src }}
|
||||
path: {{ nfs-mount-path }}
|
||||
fstype: nfs
|
||||
opts: defaults
|
||||
# don't specify dump and fsck to keep the 0 (don't) variable
|
Loading…
Reference in a new issue