aboutsummaryrefslogtreecommitdiffstats
path: root/roles/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nfsd')
-rw-r--r--roles/nfsd/defaults/main.yml7
-rw-r--r--roles/nfsd/tasks/main.yml22
-rw-r--r--roles/nfsd/templates/etc-exports.j22
3 files changed, 3 insertions, 28 deletions
diff --git a/roles/nfsd/defaults/main.yml b/roles/nfsd/defaults/main.yml
index d116b22..618b721 100644
--- a/roles/nfsd/defaults/main.yml
+++ b/roles/nfsd/defaults/main.yml
@@ -4,11 +4,6 @@
---
nfsd_dir: "/data/nfs"
-nfsd_dirs: "undefined"
+nfsd_dirs: null
nfsd_config: "/etc/exports"
nfsd_nb_process: 10
-
-nfsd_user: nfsu
-nfsd_user_id: 2000
-nfsd_group: nfsu
-nfsd_group_id: 2000
diff --git a/roles/nfsd/tasks/main.yml b/roles/nfsd/tasks/main.yml
index 7da9240..71e9b55 100644
--- a/roles/nfsd/tasks/main.yml
+++ b/roles/nfsd/tasks/main.yml
@@ -4,29 +4,9 @@
---
-- debug:
- var: nfsd_dirs
-
- name: ensure nfsd required variables are set
fail:
- when: item == "undefined"
- 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
+ when: nsfd_dirs is none
- name: ensure nfsd directory exists
file:
diff --git a/roles/nfsd/templates/etc-exports.j2 b/roles/nfsd/templates/etc-exports.j2
index 2fdbf21..545846f 100644
--- a/roles/nfsd/templates/etc-exports.j2
+++ b/roles/nfsd/templates/etc-exports.j2
@@ -4,5 +4,5 @@
{% for host in groups["servers"] %}
{% set host = dict(hostvars[host]) %}
-/data/nfs/{{ host.ansible_host }} -maproot=0:0 -alldirs {{ host.ip.in if host.ip.in is defined }} {{ host.ip.out if host.ip.out is defined }}
+/data/nfs/{{ host.ansible_host }} -maproot=root {{ host.ip.in if host.ip.in is defined }} {{ host.ip.out if host.ip.out is defined }}
{% endfor %}
remember that computers suck.