forked from ISTI-ansible-roles/ansible-roles
data_disk: handle the NFS case.
This commit is contained in:
parent
2c70d94945
commit
a9d1585066
|
@ -1,16 +1,25 @@
|
||||||
---
|
---
|
||||||
- name: Create a file system on the new disks
|
- block:
|
||||||
filesystem: dev=/dev/{{ item.device }} fstype={{ item.fstype }} force=no
|
- name: Create a file system on the new disks
|
||||||
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
filesystem: dev=/dev/{{ item.device }} fstype={{ item.fstype }} force=no
|
||||||
when:
|
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
||||||
- additional_disks
|
when:
|
||||||
- item.create_filesystem
|
- additional_disks
|
||||||
tags: [ 'data_disk', 'mountpoint' ]
|
- item.create_filesystem
|
||||||
|
|
||||||
|
- name: Install the NFS client utilities when we are going to mount a NFS file system
|
||||||
|
apt: pkg=nfs-common state=present update_cache=yes cache_valid_time=1800
|
||||||
|
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
||||||
|
when: item.fstype == 'nfs'
|
||||||
|
|
||||||
|
- name: Install the NFS 4 acl tools when we are going to mount a NFS file system
|
||||||
|
apt: pkg=nfs4-acl-tools state=present update_cache=yes cache_valid_time=1800
|
||||||
|
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
||||||
|
when: item.fstype == 'nfs'
|
||||||
|
|
||||||
|
- name: Manage the additional file systems
|
||||||
|
mount: name={{ item.mountpoint }} src={{ item.root_device | default('/dev') }}/{{ item.device }} fstype={{ item.fstype }} opts={{ item.opts }} state={{ item.state }}
|
||||||
|
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
||||||
|
|
||||||
- name: Manage the additional file systems
|
|
||||||
mount: name={{ item.mountpoint }} src=/dev/{{ item.device }} fstype={{ item.fstype }} opts={{ item.opts }} state={{ item.state }}
|
|
||||||
with_items: '{{ disks_and_mountpoints_list | default([]) }}'
|
|
||||||
when: additional_disks
|
when: additional_disks
|
||||||
tags: [ 'data_disk', 'mountpoint' ]
|
tags: [ 'data_disk', 'mountpoint' ]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue