# How to mount tmpfs?

**URL:** <https://forum.ansible.com/t/how-to-mount-tmpfs/12651>\
**Category:** Ansible Project\
**Created:** [April 9, 2013, 12:36am UTC](https://forum.ansible.com/t/how-to-mount-tmpfs/12651 "2013-04-09T00:36:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Truong](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Steven\_Truong](https://forum.ansible.com/u/Steven_Truong)\
**Post date:** [April 9, 2013, 12:36am UTC](https://forum.ansible.com/t/how-to-mount-tmpfs/12651/1 "2013-04-09T00:36:17Z")

</div>

Hi all,

I tried to use this:

mount: name=/tmpfs/varnish src=tmpfs fstype=tmpfs opts=“size=2048m” state=present

And ansible played through without indicating any error, however, the actual mount point did not show up or get mounted at all.

When I issued ‘mount -a’ then the /tmpfs/varnish showed up.

Would you share with me what is the right way to mount tmpfs in a playbook?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [April 9, 2013, 6:01am UTC](https://forum.ansible.com/t/how-to-mount-tmpfs/12651/2 "2013-04-09T06:01:35Z")

</div>

From the ansible.mount man page:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state If mounted or unmounted, the device will be actively  
mounted or unmounted as well as just configured in fstab. absent  
and present only deal with fstab. Choices:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;present,absent,mounted,unmounted.(required)."

so you said state=present and I assume if you look you'll see the entry  
in /etc/fstab.

hope that helps,  
-sv
