How to mount tmpfs?

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.

From the ansible.mount man page:
      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:
              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