Initial commit
This commit is contained in:
commit
9054b09cc3
2 changed files with 28 additions and 0 deletions
1
defauls/main.yml
Normal file
1
defauls/main.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
nfs: {}
|
||||
27
tasks/main.yml
Normal file
27
tasks/main.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue