Skip to content

Commit

Permalink
Add default NFS version option
Browse files Browse the repository at this point in the history
  • Loading branch information
marcransome committed Jul 16, 2024
1 parent 7a4702d commit c3d8ca4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ An [Ansible Galaxy](https://galaxy.ansible.com/) role for configuring persistent

NFS filesystem mounts are configured using the `nfs_mounts_config` group/host variable. This variable should be defined as a list of dictionaries, each of which support the following parameters:

| Name | Default | Description |
|---------------|-----------|---------------------------------------------------------------------------------------|
| `path` | | The path on the remote system being provisioned which will be used as the mount point for the NFS filesystem. |
| `src` | | The source of the NFS filesystem in the form of the hostname or IP address of the NFS server and the directory being exported (e.g. `1.2.3.4:/exported`). |
| `opts` | `hard,bg` | _Optional_. Options for the NFS filesystem that will be added to the filesystem table configuration (i.e. `/etc/fstab`) in the form of a single comma-separated string. |
| `symlink` | | _Optional_. An optional path that will be used to create a symbolic link to the mount `path` specified. |
| Name | Default | Description |
|---------------|---------------------|---------------------------------------------------------------------------------------|
| `path` | | The path on the remote system being provisioned which will be used as the mount point for the NFS filesystem. |
| `src` | | The source of the NFS filesystem in the form of the hostname or IP address of the NFS server and the directory being exported (e.g. `1.2.3.4:/exported`). |
| `opts` | `hard,bg,nfsvers=4` | _Optional_. Options for the NFS filesystem that will be added to the filesystem table configuration (i.e. `/etc/fstab`) in the form of a single comma-separated string. |
| `symlink` | | _Optional_. An optional path that will be used to create a symbolic link to the mount `path` specified. |

## Example Requirements File

Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: Mount NFS shares
mount:
fstype: "{{ item.fstype | default('nfs') }}"
opts: "{{ item.opts | default('hard,bg') }}"
opts: "{{ item.opts | default('hard,bg,nfsvers=4') }}"
src: "{{ item.src }}"
path: "{{ item.path }}"
state: mounted
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0
1.1

0 comments on commit c3d8ca4

Please sign in to comment.