Hi Lewis , I am using the v 1.5.4 for ansible.posix version
ansible [core 2.13.4] config file = /home/deep/admin_git/cicd_gkr_admin_release/ansible.cfg configured module search path = ['/home/deep/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/deep/.local/lib/python3.10/site-packages/ansible ansible collection location = /home/deep/.ansible/collections:/usr/share/ansible/collections executable location = /home/deep/.local/bin/ansible python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] jinja version = 3.1.2 # /home/deep/.ansible/collections/ansible_collections Collection Version ------------------ ------- ansible.posix 1.5.4 thanks Deepak Kumar On Tue, Aug 22, 2023 at 4:51 PM Todd Lewis <[email protected]> wrote: > Note that "\040" is octal. The hex equivalent is 0x20 or decimal 32, > a.k.a. and ascii space. > > If the octal expression is being expressed in your /etc/fstab rather than > the literal space character, that sound like a bug. Which versions of > Ansible and ansible.posix are you using? > > On 8/22/23 2:48 AM, Deepak B K wrote: > > Hi Groups, > > 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? > > 192.50.250.2:\040/POOL1\040 /POOL1 nfs > nfsvers=3,soft,bg,timeo=12\0400\0400 0 0 > > My code is > 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 }}" > > I appreciate your help. > > Thanks > Deepak Kumar > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/244ab497-16fd-44dc-a7fe-6f96d82b0febn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/244ab497-16fd-44dc-a7fe-6f96d82b0febn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- > Todd > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/3a02c8d0-d89b-8c87-012e-ae839909882f%40gmail.com > <https://groups.google.com/d/msgid/ansible-project/3a02c8d0-d89b-8c87-012e-ae839909882f%40gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF%3DeWbKTdSbKzz-kYjbb%3DCEq%2BriNMAT-yFF0xeHGgWQuiHHxgg%40mail.gmail.com.
