cellinfo
/
ansible.nfs
Archived
2
0
Fork 0

Manage nfs-client configuration file.

This commit is contained in:
Jeremy Gardais 2017-07-20 15:55:21 +02:00
parent 413fc20c6a
commit 361a1e0cee
4 changed files with 39 additions and 1 deletions

View File

@ -11,12 +11,14 @@
## Overview ## Overview
Manage NFS (client) installation. Manage NFS (client) installation and configuration.
## Role Variables ## Role Variables
* **nfs_cli_manage**: If `nfs-client` should be managed with this role [default: `true`]. * **nfs_cli_manage**: If `nfs-client` should be managed with this role [default: `true`].
* **nfs_cli_pkg_state**: State of new `nfs-client` package(s) [default: `installed`]. * **nfs_cli_pkg_state**: State of new `nfs-client` package(s) [default: `installed`].
* **nfs_cli_conf_path**: Configuration file for `nfs-client` [default: `/etc/default/nfs-common`].
* **nfs_cli_conf_tpl**: Template used to generate the previous config file [default: `etc/default/nfs-common.j2`].
### OS Specific Variables ### OS Specific Variables
@ -38,6 +40,7 @@ Please see default value by Operating System file in [vars][vars directory] dire
This role will: This role will:
* Install needed packages to provide `nfs-client`. * Install needed packages to provide `nfs-client`.
* Manage `nfs-client` configuration files.
## Development ## Development

View File

@ -4,3 +4,5 @@
# client # client
nfs_cli_manage: true nfs_cli_manage: true
nfs_cli_pkg_state: 'installed' nfs_cli_pkg_state: 'installed'
nfs_cli_conf_path: '/etc/default/nfs-common'
nfs_cli_conf_tpl: 'etc/default/nfs-common.j2'

View File

@ -15,4 +15,16 @@
state: '{{ nfs_cli_pkg_state }}' state: '{{ nfs_cli_pkg_state }}'
with_items: with_items:
- '{{ nfs_cli_pkg_list }}' - '{{ nfs_cli_pkg_list }}'
when: nfs_cli_manage
- name: CONFIG nfs-client
template:
src: '{{ nfs_cli_conf_tpl }}'
dest: '{{ nfs_cli_conf_path }}'
owner: root
group: root
mode: 0644
backup: true
when: nfs_cli_manage
# }}} # }}}

View File

@ -0,0 +1,21 @@
# {{ ansible_managed }}
# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".
# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=
# Options for rpc.statd.
# Should rpc.statd listen on a specific port? This is especially useful
# when you have a port-based firewall. To use a fixed port, set this
# this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
# For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
STATDOPTS=
# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=
# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=