From 15877af7678b39589acf4ee77f7a2f4263423a5f Mon Sep 17 00:00:00 2001 From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de> Date: Tue, 6 Dec 2016 21:41:32 +0100 Subject: [PATCH] Fixed idmapper in nfs-client --- nfs-client/handlers/main.yml | 6 ++++++ nfs-client/tasks/main.yml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/nfs-client/handlers/main.yml b/nfs-client/handlers/main.yml index b6756c0..cad9209 100644 --- a/nfs-client/handlers/main.yml +++ b/nfs-client/handlers/main.yml @@ -3,3 +3,9 @@ - name: restart autofs service: name=autofs state=restarted + +- name: restart nfs-common + service: name=nfs-common state=restarted + +- name: reload sysfs.conf + service: name=sysfsutils state=restarted diff --git a/nfs-client/tasks/main.yml b/nfs-client/tasks/main.yml index f7165b8..b79fc79 100644 --- a/nfs-client/tasks/main.yml +++ b/nfs-client/tasks/main.yml @@ -10,13 +10,40 @@ - name: ensure CIFS utils are installed apt: name=cifs-utils,smbclient state=latest tags: + - nfs-client - cifs-client - packages +- name: ensure sysfs-utils are installed + apt: name=sysfsutils state=present + tags: + - nfs-client + - packages + +- name: ensure we use the idmapper + command: 'echo "N" > /sys/module/nfs/parameters/nfs4_disable_idmapping' + notify: + - restart nfs-common + tags: + - nfs-client + - sysfs + - config + +- name: ensure we use the idmapper after a reboot + lineinfile: line="module/nfs/parameters/nfs4_disable_idmapping = N" dest=/etc/sysfs.conf create=yes + notify: + - reload sysfs.conf + - restart nfs-common + tags: + - nfs-client + - sysfs + - config + # makes life much easier to have an automounter and not /etc/fstab - name: ensure automounter is installed apt: name=autofs state=latest tags: + - nfs-client - autofs - packages @@ -25,12 +52,14 @@ notify: - restart autofs tags: + - nfs-client - autofs - config - name: ensure mounts from central storage are available template: src=auto.nfs.j2 dest=/etc/auto.nfs owner=root group=root mode=0644 notify: + - nfs-client - restart autofs tags: - autofs @@ -39,18 +68,21 @@ - name: ensure automounter is enabled service: name=autofs state=running enabled=yes tags: + - nfs-client - autofs - service - name: ensure linking of home script: create_netdir.sh home tags: + - nfs-client - fsmpi - autofs - name: ensure linking of pub script: create_netdir.sh pub tags: + - nfs-client - fsmpi - autofs -- GitLab