Re: [ansible-project] How to check if file system is mounted?

155 views
Skip to first unread message

Matt Martz

unread,
May 22, 2016, 7:32:27 PM5/22/16
to ansible...@googlegroups.com
The setup module that normally runs at the start of the play will return mounts of a system in `ansible_mounts` (if I remember the var name correctly)

You can use this var to look.


On Sunday, May 22, 2016, Robert F <robert....@gmail.com> wrote:
Is there a canonical way to use Ansible to see if a file system on a remote host is mounted?  Ansible's mount module doesn't seem to address this need.  I'm trying to do it as follows but I get an error:

- name: check if file system mounted

--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/162ed205-cc44-4c41-8606-47a6c749a896%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Robert F

unread,
May 22, 2016, 9:21:50 PM5/22/16
to Ansible Project
Yes, the is an ansible_mounts fact but I had checked it previously and it doesn't indicate that the file system is mounted even though I know it is.


On Sunday, May 22, 2016 at 4:32:27 PM UTC-7, Matt Martz wrote:
The setup module that normally runs at the start of the play will return mounts of a system in `ansible_mounts` (if I remember the var name correctly)

You can use this var to look.





Reply all
Reply to author
Forward
0 new messages