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.yml26
1 files changed, 17 insertions, 9 deletions
diff --git a/roles/nfsd/tasks/main.yml b/roles/nfsd/tasks/main.yml
index 7be5f2a..a8cabcf 100644
--- a/roles/nfsd/tasks/main.yml
+++ b/roles/nfsd/tasks/main.yml
@@ -1,6 +1,6 @@
- name: create nfsd data directory
file:
- path: "{{ nfsd_data_dir }}"
+ path: "{{ nfsd_dir }}"
owner: 0
group: 0
mode: 0700
@@ -8,7 +8,7 @@
- name: create hosts directories
file:
- path: "{{ nfsd_data_dir }}/{{ item }}"
+ path: "{{ nfsd_dir }}/{{ item }}"
owner: 0
group: 0
mode: 0777
@@ -19,17 +19,25 @@
template:
src: exports.j2
dest: /etc/exports
- owner: root
+ owner: 0
+ group: 0
mode: 0640
register: result
-- name: enable and start nfsd service
- service: &nfsd_service
- name: nfsd
- state: "{{ 'restarted' if result.changed else 'started' }}"
+- name: enable and restart portmap
+ service: &enable_and_restart
+ name: portmap
+ state: restarted
enabled: true
-- name: enable and restart mountd
+- name: enable and reload/restart mountd
service:
- <<: *nfsd_service
+ <<: *enable_and_restart
name: mountd
+ state: reloaded
+
+- name: enable and restart nfsd
+ service:
+ <<: *enable_and_restart
+ name: nfsd
+ state: restarted
remember that computers suck.