Initial commit

This commit is contained in:
nd 2019-03-10 22:07:36 +01:00
commit 9054b09cc3
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 28 additions and 0 deletions

27
tasks/main.yml Normal file
View file

@ -0,0 +1,27 @@
- name: install nfs client tools
package:
name: nfs-client
- name: create mount points if they don't exist
with_dict: "{{ nfs }}"
file:
path: "{{ item.value.mountpoint }}"
state: directory
- name: mount nfs shares
with_dict: "{{ nfs }}"
mount:
path: "{{ item.value.mountpoint }}"
src: "{{ item.value.source }}"
opts: "{{ item.value.options }}"
fstype: nfs
state: mounted
- name: write nfs shares to fstab
with_dict: "{{ nfs }}"
mount:
path: "{{ item.value.mountpoint }}"
src: "{{ item.value.source }}"
opts: "{{ item.value.options }}"
fstype: nfs
state: present