nfs client ansible

21 views
Skip to first unread message

Sandy Hung

unread,
Mar 27, 2020, 5:08:24 AM3/27/20
to Ansible Project
dear all:

fatal: [192.168.1.120]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "dump": "0",
            "fstype": "nfs",
            "opts": "defaults,nobootwait",
            "passno": "2",
            "path": "/nfs",
            "sate": "mounted",
            "src": "192.168.1.146/share/share"
        }
    },
    "msg": "Unsupported parameters for (mount) module: sate Supported parameters include: backup, boot, dump, fstab, fstype, opts, passno, path, src, state"
}
 
i don't know why unsupported mount module


my ansible
---
 - hosts: all
   gather_facts: no
   become: yes

   tasks:
     - name: Ensure NFS Common is installed
       apt: name=nfs-common update_cache=yes

     - name: Create mountable dir
       file: path=/nfs state=directory mode=777 owner=sandy group=sandy

     - name: set mountpoints
       mount:
          path=/nfs
          src=192.168.1.146/share/share
          fstype=nfs
          opts=defaults,nobootwait
          dump=0
          passno=2
          sate=mounted

Mark Whaite

unread,
Mar 27, 2020, 5:16:30 AM3/27/20
to ansible...@googlegroups.com
Hi

Are you missing a : from the src?

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ea6594b2-fe17-4f2f-9f91-07df91dfcbe6%40googlegroups.com.


--
Mark Whaite, Systems Administrator
Adelard LLP
Adelard LLP, Units 24 Waterside, 44-48 Wharf Road, London N1 7UX
Tel: 020 7832 5850
Web: http://www.adelard.com

This e-mail, and any attachments, is confidential and for the use of the addressee only. If you are not the intended recipient, please telephone 020 7832 5850. We do not accept legal responsibility for this e-mail or any viruses.

Registered office: Stourside Place, Station Road, Ashford, Kent TN12 1PP
Registered in England & Wales no. OC 304551. VAT no. 454 489808

Vladimir Botka

unread,
Mar 27, 2020, 5:27:00 AM3/27/20
to Mark Whaite, ansible...@googlegroups.com
On Fri, 27 Mar 2020 09:15:38 +0000
Mark Whaite <m...@adelard.com> wrote:

> Are you missing a : from the src?
>
> On Fri, 27 Mar 2020 at 09:08, Sandy Hung <sandy...@abagile.com> wrote:
> > fatal: [192.168.1.120]: FAILED! => {
> > [...]
> > "msg": "Unsupported parameters for (mount) module: sate Supported
> > parameters include: backup, boot, dump, fstab, fstype, opts, passno, path,
> > src, state"
> > [...]
> > - name: set mountpoints
> > mount:
> > path=/nfs
> > src=192.168.1.146/share/share
> > fstype=nfs
> > opts=defaults,nobootwait
> > dump=0
> > passno=2
> > sate=mounted

The error is clear "Unsupported parameters ... sate". Correct

state=mounted

HTH,

-vlado

sandy...@abagile.com

unread,
Mar 27, 2020, 5:34:22 AM3/27/20
to ansible...@googlegroups.com

Jean-Yves LENHOF

unread,
Mar 27, 2020, 6:21:05 AM3/27/20
to ansible...@googlegroups.com

Wrong argument :

sate --> state

Regards,

sandy...@abagile.com

unread,
Mar 29, 2020, 11:05:54 PM3/29/20
to ansible...@googlegroups.com

Dear all:

 

I can connect to this ip  and share folder

"msg": "Error mounting /nfs: mount.nfs: remote share not in 'host:dir' format\n"

 

BR

Sandy

 

 

 

my ansible

---

 - hosts: all

   gather_facts: no

   become: yes

 

   tasks:

     - name: Ensure NFS Common is installed

       apt: name=nfs-common update_cache=yes

 

     - name: Create mountable dir

       file: path=/nfs state=directory mode=777 owner=sandy group=sandy

 

     - name: set mountpoints

       mount:

          path=/nfs

          src=192.168.1.146/share/share

          fstype=nfs

          opts=defaults,nobootwait

          dump=0

          passno=2

          state=mounted

image003.jpg
Reply all
Reply to author
Forward
0 new messages