This module controls active and configured mount points in C(/etc/fstab).

Options

namedescriptionrequiredchoices
name path to the mount point, eg: C(/mnt/files) true
src device to be mounted on I(name). true
fstype file-system type true
opts mount options (see fstab(8))
dump dump (see fstab(8)), Note that if nulled, C(state=present) will cease to work and duplicate entries will be made with subsequent runs.
passno passno (see fstab(8)), Note that if nulled, C(state=present) will cease to work and duplicate entries will be made with subsequent runs.
state If C(mounted) or C(unmounted), the device will be actively mounted or unmounted as needed and appropriately configured in I(fstab). C(absent) and C(present) only deal with I(fstab) but will not affect current mounting. If specifying C(mounted) and the mount point is not present, the mount point will be created. Similarly, specifying C(absent) will remove the mount point directory. true
  • present
  • absentmountedunmounted
fstab file to use instead of C(/etc/fstab). You shouldn't use that option unless you really know what you are doing. This might be useful if you need to configure mountpoints in a chroot environment.

Author

Ansible Core Team ,Seth Vidal