I am using ansible.builtin.mountd module to mount and add the entry in the fstab in couple of hosts but I see that its adding \040 for the white space . How to get rid of this junk character being added to /etc/fstab?
vars:
mount_point:
- path: "/P1"
nfs_server: "
192.50.250.2:"
source: "/P1"
fstype: nfs
opts: "nfsvers=3,soft,bg,timeo=12 0 0"
- path: "/Test-Data"
nfs_server: "
192.62.150.231:"
source: "/volume9/Test-Data"
fstype: nfs
opts: "nfsvers=3,rw,bg,rsize=131072,wsize=131072,soft,proto=tcp,sec=sys 0 0"
nfs_mount_hosts:
- "dev-app601"
- "dev-sgapp601"
- "tst-sgapp601"
- "tst-app601"
- name: Mount NFS directories P1
become: true
remote_user: testops
ansible.posix.mount:
fstype: "{{ mount_point[0].fstype }}"
src: "{{ mount_point[0].nfs_server }} {{ mount_point[0].source }} "
path: "{{ mount_point[0].path}}"
opts: "{{ mount_point[0].opts }}"
state: mounted
delegate_to: "{{ item }}"
loop: "{{ nfs_mount_hosts }}"