mount
Collection: builtin
Full Name: parallax.builtin.mount
Aliases: ansible.builtin.mount, mount
Synopsis
Manage mount
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| src | string | Device to mount or for bind mounts, the directory to bind (alias: name) | ||
| path | string | yes | Mount path (alias: dest, name) | |
| fstype | string | Filesystem type for mount operation | ||
| state | string | mounted | Mount state Choices: absent, ephemeral, mounted, present, remounted, unmounted | |
| opts | string | Mount options (comma-separated) | ||
| passno | int | 0 | Passno field in /etc/fstab | |
| dump | int | 0 | Dump field in /etc/fstab | |
| fstab | string | /etc/fstab | Path to fstab file | |
| backup | bool | false | Create backup of fstab before making changes | |
| boot | bool | true | Determines if filesystem should be mounted at boot time | |
| ephemeral | bool | false | Mount without adding entry to fstab | |
| force | bool | false | Force unmount (with -f flag) | |
| lazy | bool | false | Lazy unmount (with -l flag) | |
| mkdir | bool | true | Create mount point directory if it doesn’t exist | |
| mode | string | Mode for created mount point directory | ||
| owner | string | Owner for created mount point directory | ||
| group | string | Group for created mount point directory | ||
| name | string | Alias for src parameter (device/source to mount) | ||
| dest | string | Alias for path parameter (mount destination) |
Example
- name: Example mount task
mount:
path: <your_path>