aboutsummaryrefslogtreecommitdiffstats
path: root/roles/nfsd/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nfsd/tasks/main.yml')
-rw-r--r--roles/nfsd/tasks/main.yml23
1 files changed, 20 insertions, 3 deletions
diff --git a/roles/nfsd/tasks/main.yml b/roles/nfsd/tasks/main.yml
index 2f64fdb..7da9240 100644
--- a/roles/nfsd/tasks/main.yml
+++ b/roles/nfsd/tasks/main.yml
@@ -13,18 +13,35 @@
loop:
- "{{ nfsd_dirs }}"
+- name: ensure nfs shared group exists
+ group:
+ name: "{{ nfsd_group }}"
+ gid: "{{ nfsd_group_id }}"
+ system: true
+ state: absent
+
+- name: ensure nfs shared user exists
+ user:
+ name: "{{ nfsd_user }}"
+ uid: "{{ nfsd_user_id }}"
+ group: "{{ nfsd_group }}"
+ system: true
+ state: absent
+
- name: ensure nfsd directory exists
file:
path: "{{ nfsd_dir }}"
- owner: root
+ owner: 0
+ group: 0
mode: 0700
state: directory
- name: ensure directories exists
file:
path: "{{ nfsd_dir }}/{{ item }}"
- owner: root
- mode: 0700
+ owner: 0
+ group: 0
+ mode: 0777
state: directory
loop: "{{ nfsd_dirs.split(' ') if nfsd_dirs is string else nfsd_dirs }}"
remember that computers suck.