How can I write a playbook to
- Make sure both NFS server and client listen to same domain in
/etc/idmapd.conf
and confirmed withnfsidmap -d
[General]
Verbosity = 0
Pipefs-Directory = /run/rpc_pipefs
# set your own domain here, if it differs from FQDN minus hostname
Domain = localdomain
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup
- Also Enable the id mapping in
/sys/module/nfsd/parameters/nfs4_disable_idmapping
It is currently Y and I need it to be N. I tried running the playbook below but I get an error:
- hosts: localhost
tasks:
- name: Run command to enable id mapping
become: true
lineinfile:
path: /sys/module/nfs/parameters/nfs4_disable_idmapping
regexp: 'Y'
line: 'N'
state: present
- Finally Run the command
nfsidmap -c