# RFC: Ephemeral Mounts

**URL:** <https://forum.ansible.com/t/rfc-ephemeral-mounts/14663>\
**Category:** Ansible Developer\
**Created:** [February 26, 2014, 10:17pm UTC](https://forum.ansible.com/t/rfc-ephemeral-mounts/14663 "2014-02-26T22:17:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dustin\_C\_Hatch](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@Dustin\_C\_Hatch](https://forum.ansible.com/u/Dustin_C_Hatch)\
**Post date:** [February 26, 2014, 10:17pm UTC](https://forum.ansible.com/t/rfc-ephemeral-mounts/14663/1 "2014-02-26T22:17:52Z")

</div>

Hi,

I have a playbook that requires filesystems to be mounted temporarily,  
and I do not want to have them recorded in /etc/fstab. I was originally  
using the command module to call mount and do it by hand, but that  
required a lot of boilerplate in my playbook. I thus set out to tweak  
the mount module to provide an option to skip writing of /etc/fstab. I  
noticed that it has an undocumented argument, fstab, which is used to  
specify the path to /etc/fstab. Unfortunately, if this argument is used  
in combination with state=mounted, the mount fails. I made a minor  
change[1] to allow it to work by explicitly passing all the necessary  
information to the mount command, rather than rely on it being specified  
in fstab. This works, with the minor caveat that when fstab=/dev/null,  
it always reports changed, even if it didn't actually do anything. That  
should be relatively easy to fix, but before I dive too far into the  
rabbit hole, I wanted to get other opinions on the problem and possible  
solutions.

[1] [https://github.com/AdmiralNemo/ansible/commits/enhance-mount](https://github.com/AdmiralNemo/ansible/commits/enhance-mount)

Thanks,

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 26, 2014, 10:29pm UTC](https://forum.ansible.com/t/rfc-ephemeral-mounts/14663/2 "2014-02-26T22:29:52Z")

</div>

I’m fine with supporting the concept.

Rather than fstab=/dev/null, perhaps it would be a little easier to grok if we added add\_to\_fstab=False (default True, to be consistent with present behavior).

I think this might be a little closer to the abstraction level we might want.
