You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
mount - Control active and configured mount points¶
Determines if the filesystem should be mounted on boot.
Only applies to Solaris systems.
Dump (see fstab(5)). Note that if set to null and state set to present, it will cease to work and duplicate entries will be made with subsequent runs.
Has no effect on Solaris systems.
/etc/fstab (/etc/vfstab on Solaris)
File to use instead of /etc/fstab. You shouldn't use this option unless you really know what you are doing. This might be useful if you need to configure mountpoints in a chroot environment. OpenBSD does not allow specifying alternate fstab files with mount so do not use this on OpenBSD with any state that operates on the live filesystem.
Filesystem type. Required when state is present or mounted.
Mount options (see fstab(5), or vfstab(4) on Solaris).
Passno (see fstab(5)). Note that if set to null and state set to present, it will cease to work and duplicate entries will be made with subsequent runs.
Deprecated on Solaris systems.
Path to the mount point (e.g. /mnt/files).
Before 2.3 this option was only usable as dest, destfile and name.
Device to be mounted on path. Required when state set to present or mounted.
If mounted or unmounted, the device will be actively mounted or unmounted as needed and appropriately configured in fstab.
absent and present only deal with fstab but will not affect current mounting.
If specifying mounted and the mount point is not present, the mount point will be created.
Similarly, specifying absent will remove the mount point directory.
# Before 2.3, option 'name' was used instead of 'path'-name:Mount DVD read-onlymount:path:/mnt/dvdsrc:/dev/sr0fstype:iso9660opts:rostate:present-name:Mount up device by labelmount:path:/srv/disksrc:LABEL=SOME_LABELfstype:ext4state:present-name:Mount up device by UUIDmount:path:/homesrc:UUID=b3e48f45-f933-4c8e-a700-22a159ec9077fstype:xfsopts:noatimestate:present