From c3d8ca4986402f89eef247231bd2146614a2ef4d Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Tue, 16 Jul 2024 12:52:18 +0100 Subject: [PATCH] Add default NFS version option --- README.md | 12 ++++++------ tasks/main.yml | 2 +- version | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8c6e8e9..10970b5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index 4616be5..071839b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/version b/version index d3827e7..9459d4b 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.0 +1.1