summaryrefslogtreecommitdiffstats
path: root/roles/ands_storage/tasks/nfs.yml
blob: 98a23bec74776d2b32f16373ccd139f2cc136e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: Create mountable dir
  file: path=/mnt/ands state=directory mode=755 owner=root group=root

- name: Create mountable dir
  file: path=/mnt/pdv state=directory mode=755 owner=root group=root

- name: set mountpoints
  mount: name=/mnt/ands src="{{ ands_nfs_server }}:/mnt/ands" fstype=nfs4 opts=defaults,minorversion=1,_netdev,nofail,soft,nodiratime,noatime dump=0 passno=0 state="{{ ands_mount_nfs | default(false) | ternary ('mounted', 'absent') }}"
  when:  
    - ands_nfs_server is defined
    - ands_nfs_server | default(None) not in ansible_all_ipv4_addresses

- name: set mountpoints
  mount: name=/mnt/pdv src="{{ ands_pdv_server }}:/mnt/pdv" fstype=nfs opts=defaults,_netdev,nofail,soft,nodiratime,noatime dump=0 passno=0 state=mounted
  when: 
    - ands_pdv_server is defined
    - ands_pdv_server | default(None) not in ansible_all_ipv4_addresses