diff --git a/.gitignore b/.gitignore index fff68df..f66d302 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ vendor/ .vendor/ spec/fixtures/ pkg/ -log/ \ No newline at end of file +log/ +.yardoc diff --git a/REFERENCE.md b/REFERENCE.md new file mode 100644 index 0000000..72c292d --- /dev/null +++ b/REFERENCE.md @@ -0,0 +1,1404 @@ +# Reference + + + +## Table of Contents + +### Classes + +* [`nfs`](#nfs): Class: nfs::init * {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] * Daniel Klockenkaemper * +* [`nfs::client::package`](#nfs--client--package): Class: nfs::client::package This Function exists to 1. install needed packages for nfs clients * Daniel Klockenkaemper * Ma +* [`nfs::server::package`](#nfs--server--package): Class: nfs::server::package This Function exists to 1. install needed packages for nfs server * Daniel Klockenkaemper +* [`nfs::functions::create_export`](#nfs--functions--create_export): Function: nfs::functions::create_export This Function exists to 1. manage export creation * Daniel Klockenkaemper * +* [`nfs::functions::nfsv4_bindmount`](#nfs--functions--nfsv4_bindmount): Function: nfs::functions::nfsv4_bindmount This Function exists to 1. manage bindmounts for nfs4 * Daniel Klockenkaemper `nfs` + +Class: nfs::init + +* {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs` class: + +* [`ensure`](#-nfs--ensure) +* [`server_enabled`](#-nfs--server_enabled) +* [`client_enabled`](#-nfs--client_enabled) +* [`storeconfigs_enabled`](#-nfs--storeconfigs_enabled) +* [`nfs_v4`](#-nfs--nfs_v4) +* [`nfs_v4_client`](#-nfs--nfs_v4_client) +* [`exports_file`](#-nfs--exports_file) +* [`idmapd_file`](#-nfs--idmapd_file) +* [`defaults_file`](#-nfs--defaults_file) +* [`manage_packages`](#-nfs--manage_packages) +* [`server_packages`](#-nfs--server_packages) +* [`server_package_ensure`](#-nfs--server_package_ensure) +* [`client_packages`](#-nfs--client_packages) +* [`client_package_ensure`](#-nfs--client_package_ensure) +* [`manage_server_service`](#-nfs--manage_server_service) +* [`manage_server_servicehelper`](#-nfs--manage_server_servicehelper) +* [`manage_client_service`](#-nfs--manage_client_service) +* [`server_service_name`](#-nfs--server_service_name) +* [`server_service_ensure`](#-nfs--server_service_ensure) +* [`server_service_enable`](#-nfs--server_service_enable) +* [`server_service_hasrestart`](#-nfs--server_service_hasrestart) +* [`server_service_hasstatus`](#-nfs--server_service_hasstatus) +* [`server_service_restart_cmd`](#-nfs--server_service_restart_cmd) +* [`server_nfsv4_servicehelper`](#-nfs--server_nfsv4_servicehelper) +* [`client_services`](#-nfs--client_services) +* [`client_nfsv4_services`](#-nfs--client_nfsv4_services) +* [`client_services_enable`](#-nfs--client_services_enable) +* [`client_idmapd_setting`](#-nfs--client_idmapd_setting) +* [`client_nfs_fstype`](#-nfs--client_nfs_fstype) +* [`client_nfs_options`](#-nfs--client_nfs_options) +* [`client_nfsv4_fstype`](#-nfs--client_nfsv4_fstype) +* [`client_nfsv4_options`](#-nfs--client_nfsv4_options) +* [`nfs_v4_export_root`](#-nfs--nfs_v4_export_root) +* [`nfs_v4_export_root_clients`](#-nfs--nfs_v4_export_root_clients) +* [`nfs_v4_mount_root`](#-nfs--nfs_v4_mount_root) +* [`nfs_v4_idmap_domain`](#-nfs--nfs_v4_idmap_domain) +* [`nfsv4_bindmount_enable`](#-nfs--nfsv4_bindmount_enable) +* [`client_need_gssd`](#-nfs--client_need_gssd) +* [`client_gssd_service`](#-nfs--client_gssd_service) +* [`client_gssd_options`](#-nfs--client_gssd_options) +* [`client_d9_gssdopt_workaround`](#-nfs--client_d9_gssdopt_workaround) +* [`nfs_v4_idmap_localrealms`](#-nfs--nfs_v4_idmap_localrealms) +* [`nfs_v4_idmap_cache`](#-nfs--nfs_v4_idmap_cache) +* [`manage_nfs_v4_idmap_nobody_mapping`](#-nfs--manage_nfs_v4_idmap_nobody_mapping) +* [`nfs_v4_idmap_nobody_user`](#-nfs--nfs_v4_idmap_nobody_user) +* [`nfs_v4_idmap_nobody_group`](#-nfs--nfs_v4_idmap_nobody_group) +* [`client_rpcbind_config`](#-nfs--client_rpcbind_config) +* [`client_rpcbind_optname`](#-nfs--client_rpcbind_optname) +* [`client_rpcbind_opts`](#-nfs--client_rpcbind_opts) +* [`nfs_v4_root_export_ensure`](#-nfs--nfs_v4_root_export_ensure) +* [`nfs_v4_root_export_mount`](#-nfs--nfs_v4_root_export_mount) +* [`nfs_v4_root_export_remounts`](#-nfs--nfs_v4_root_export_remounts) +* [`nfs_v4_root_export_atboot`](#-nfs--nfs_v4_root_export_atboot) +* [`nfs_v4_root_export_options`](#-nfs--nfs_v4_root_export_options) +* [`nfs_v4_root_export_bindmount`](#-nfs--nfs_v4_root_export_bindmount) +* [`nfs_v4_root_export_tag`](#-nfs--nfs_v4_root_export_tag) +* [`client_gssd_service_name`](#-nfs--client_gssd_service_name) +* [`client_services_hasrestart`](#-nfs--client_services_hasrestart) +* [`client_services_hasstatus`](#-nfs--client_services_hasstatus) +* [`client_gssdopt_name`](#-nfs--client_gssdopt_name) + +##### `ensure` + +Data type: `Enum['present', 'absent', 'running', 'stopped', 'disabled']` + +String. Controls if the managed resources shall be present or +absent. If set to absent: +* The managed software packages are being uninstalled. +* Any traces of the packages will be purged as good as possible. This may + include existing configuration files. The exact behavior is provider + dependent. Q.v.: + * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] + * {Puppet's package provider source code}[http://j.mp/wtVCaL] +* System modifications (if any) will be reverted as good as possible + (e.g. removal of created users, services, changed log settings, ...). +* This is thus destructive and should be used with care. +Defaults to present. + +Default value: `'present'` + +##### `server_enabled` + +Data type: `Boolean` + +Boolean. If set to true, this module will configure the node +to act as a nfs server. + +Default value: `false` + +##### `client_enabled` + +Data type: `Boolean` + +Boolean. If set to true, this module will configure the node +to act as a client server, you can use the exported mount resources +from configured servers. + +Default value: `false` + +##### `storeconfigs_enabled` + +Data type: `Boolean` + +Boolean. If set to false, this module will not export any +resources as storeconfigs. Defaults to true. + +Default value: `true` + +##### `nfs_v4` + +Data type: `Boolean` + +Boolean. If set to true, this module will use nfs version 4 +for exporting and mounting nfs resources. + +Default value: `$nfs::params::nfs_v4` + +##### `nfs_v4_client` + +Data type: `Boolean` + +Boolean. If set to true, this module will use nfs version 4 +for mounting nfs resources. If set to false it will use nfs +version 3 to mount nfs resources. It defaults to the setting of @param nfs_v4 + +Default value: `$nfs::params::nfs_v4` + +##### `exports_file` + +Data type: `Stdlib::Absolutepath` + +String. It defines the location of file with the nfs export resources used +by the nfs server. + +Default value: `$nfs::params::exports_file` + +##### `idmapd_file` + +Data type: `Stdlib::Absolutepath` + +String. It defines the location of the file with the idmapd settings. + +Default value: `$nfs::params::idmapd_file` + +##### `defaults_file` + +Data type: `Optional[Stdlib::Absolutepath]` + +String. It defines the location of the file with the nfs settings. + +Default value: `$nfs::params::defaults_file` + +##### `manage_packages` + +Data type: `Boolean` + +Boolean. It defines if the packages should be managed through this module + +Default value: `true` + +##### `server_packages` + +Data type: `Array` + +Array. It defines the packages needed to be installed for acting as +a nfs server + +Default value: `$nfs::params::server_packages` + +##### `server_package_ensure` + +Data type: `String` + +String. It defines the packages state - any of present, installed, +absent, purged, held, latest + +Default value: `'installed'` + +##### `client_packages` + +Data type: `Array` + +Array. It defines the packages needed to be installed for acting as +a nfs client + +Default value: `$nfs::params::client_packages` + +##### `client_package_ensure` + +Data type: `String` + +String. It defines the packages state - any of present, installed, +absent, purged, held, latest + +Default value: `'installed'` + +##### `manage_server_service` + +Data type: `Boolean` + +Boolean. Defines if module should manage server_service + +Default value: `true` + +##### `manage_server_servicehelper` + +Data type: `Boolean` + +Boolean. Defines if module should manage server_servicehelper + +Default value: `true` + +##### `manage_client_service` + +Data type: `Boolean` + +Boolean. Defines if module should manage client_service + +Default value: `true` + +##### `server_service_name` + +Data type: `String` + +String. It defines the servicename of the nfs server service + +Default value: `$nfs::params::server_service_name` + +##### `server_service_ensure` + +Data type: `Enum['present', 'absent', 'running', 'stopped', 'disabled']` + +Boolean. It defines the service parameter ensure for nfs server services. + +Default value: `'running'` + +##### `server_service_enable` + +Data type: `Boolean` + +Boolean. It defines the service parameter enable for nfs server service. + +Default value: `true` + +##### `server_service_hasrestart` + +Data type: `Boolean` + +Boolean. It defines the service parameter hasrestart for nfs server service. + +Default value: `$nfs::params::server_service_hasrestart` + +##### `server_service_hasstatus` + +Data type: `Boolean` + +Boolean. It defines the service parameter hasstatus for nfs server service. + +Default value: `$nfs::params::server_service_hasstatus` + +##### `server_service_restart_cmd` + +Data type: `Optional[String]` + +String. It defines the service parameter restart for nfs server service. + +Default value: `$nfs::params::server_service_restart_cmd` + +##### `server_nfsv4_servicehelper` + +Data type: `Optional[Array]` + +Array. It defines the service helper like idmapd for servers configured with +nfs version 4. + +Default value: `$nfs::params::server_nfsv4_servicehelper` + +##### `client_services` + +Data type: `Hash` + +Nested Hash. It defines the servicenames need to be started when acting as a nfs client + +Default value: `$nfs::params::client_services` + +##### `client_nfsv4_services` + +Data type: `Hash` + +Nested Hash. It defines the servicenames need to be started when acting as a nfs client +version 4. + +Default value: `$nfs::params::client_nfsv4_services` + +##### `client_services_enable` + +Data type: `Boolean` + +Boolean. It defines the service parameter enable for nfs client services. + +Default value: `$nfs::params::client_services_enable` + +##### `client_idmapd_setting` + +Data type: `Array[String]` + +Array. It defines the Augeas parameter added in @param defaults_file when acting as a nfs +version 4 client. + +Default value: `$nfs::params::client_idmapd_setting` + +##### `client_nfs_fstype` + +Data type: `String` + +String. It defines the name of the nfs filesystem, when adding entries to /etc/fstab +on a client node. + +Default value: `$nfs::params::client_nfs_fstype` + +##### `client_nfs_options` + +Data type: `String` + +String. It defines the options for the nfs filesystem, when adding entries to /etc/fstab +on a client node. + +Default value: `$nfs::params::client_nfs_options` + +##### `client_nfsv4_fstype` + +Data type: `String` + +String. It defines the name of the nfs version 4 filesystem, when adding entries +to /etc/fstab on a client node. + +Default value: `$nfs::params::client_nfsv4_fstype` + +##### `client_nfsv4_options` + +Data type: `String` + +String. It defines the options for the nfs version 4filesystem, when adding entries +to /etc/fstab on a client node. + +Default value: `$nfs::params::client_nfsv4_options` + +##### `nfs_v4_export_root` + +Data type: `String` + +String. It defines the location where nfs version 4 exports should be bindmounted to +on a server node. Defaults to /export. + +Default value: `$nfs::params::nfs_v4_export_root` + +##### `nfs_v4_export_root_clients` + +Data type: `String` + +String. It defines the clients that are allowed to mount nfs version 4 exports and +includes the option string. Defaults to +*.${::domain}(ro,fsid=root,insecure,no_subtree_check,async,root_squash). + +Default value: `$nfs::params::nfs_v4_export_root_clients` + +##### `nfs_v4_mount_root` + +Data type: `String` + +String. It defines the location where nfs version 4 clients find the mount root +on a server node. Defaults to /srv. + +Default value: `$nfs::params::nfs_v4_mount_root` + +##### `nfs_v4_idmap_domain` + +Data type: `String` + +String. It defines the name of the idmapd domain setting in @param idmapd_file needed +to be set to the same value on a server and client node to do correct uid and gid +mapping. Defaults to $::domain. + +Default value: `$nfs::params::nfs_v4_idmap_domain` + +##### `nfsv4_bindmount_enable` + +Data type: `Boolean` + +Boolean. It defines if the module should create a bindmount for the export. +Defaults to true. + +Default value: `true` + +##### `client_need_gssd` + +Data type: `Boolean` + +Boolean. If true, sets NEED_GSSD=yes in /etc/defauls/nfs-common, usable on Debian/Ubuntu + +Default value: `false` + +##### `client_gssd_service` + +Data type: `Boolean` + +Boolean. If true enable rpc-gssd service. + +Default value: `false` + +##### `client_gssd_options` + +Data type: `String` + +String. Options for rpc-gssd service. Defaults to '' + +Default value: `$nfs::params::client_gssd_options` + +##### `client_d9_gssdopt_workaround` + +Data type: `Boolean` + +Boolean. If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9 + +Default value: `false` + +##### `nfs_v4_idmap_localrealms` + +Data type: `Variant[String, Array]` + +String or Array. 'Local-Realms' option for idmapd. Defaults to '' + +Default value: `''` + +##### `nfs_v4_idmap_cache` + +Data type: `Integer` + +Integer. 'Cache-Expiration' option for idmapd. Defaults to 0 - unused. + +Default value: `0` + +##### `manage_nfs_v4_idmap_nobody_mapping` + +Data type: `Boolean` + +Boolean. Enable setting Nobody mapping in idmapd. Defaults to false. + +Default value: `false` + +##### `nfs_v4_idmap_nobody_user` + +Data type: `String` + +String. 'Nobody-User' option for idmapd. Defaults to nobody. + +Default value: `$nfs::params::nfs_v4_idmap_nobody_user` + +##### `nfs_v4_idmap_nobody_group` + +Data type: `String` + +String. 'Nobody-Group' option for idmapd. Defaults to nobody or nogroup. + +Default value: `$nfs::params::nfs_v4_idmap_nobody_group` + +##### `client_rpcbind_config` + +Data type: `Optional[Stdlib::Absolutepath]` + +String. It defines the location of the file with the rpcbind config. + +Default value: `$nfs::params::client_rpcbind_config` + +##### `client_rpcbind_optname` + +Data type: `Optional[String]` + +String. It defines the name of env variable that holds the rpcbind config. E.g. OPTIONS for Debian + +Default value: `$nfs::params::client_rpcbind_optname` + +##### `client_rpcbind_opts` + +Data type: `Optional[String]` + +String. Options for rpcbind service. + +Default value: `undef` + +##### `nfs_v4_root_export_ensure` + +Data type: `String` + +String. It defines the state of the nfs version 4 root export. Defaults to mounted. + +Default value: `'mounted'` + +##### `nfs_v4_root_export_mount` + +Data type: `Optional[String]` + +String. It defines the mountpoint of the nfs version 4 root export. Defaults to undef. + +Default value: `undef` + +##### `nfs_v4_root_export_remounts` + +Data type: `Boolean` + +Boolean. It defines if the nfs version 4 root export should be remounted. Defaults to false. + +Default value: `false` + +##### `nfs_v4_root_export_atboot` + +Data type: `Boolean` + +Boolean. It defines if the nfs version 4 root export should be mounted at boot. Defaults to false. + +Default value: `false` + +##### `nfs_v4_root_export_options` + +Data type: `String` + +String. It defines the options for the nfs version 4 root export. Defaults to _netdev. + +Default value: `'_netdev'` + +##### `nfs_v4_root_export_bindmount` + +Data type: `Optional[String]` + +String. It defines the bindmount of the nfs version 4 root export. Defaults to undef. + +Default value: `undef` + +##### `nfs_v4_root_export_tag` + +Data type: `Optional[String]` + +String. It defines the tag of the nfs version 4 root export. Defaults to undef. + +Default value: `undef` + +##### `client_gssd_service_name` + +Data type: `Optional[Hash]` + +Hash. It defines the servicename of the rpc-gssd service. + +Default value: `$nfs::params::client_gssd_service_name` + +##### `client_services_hasrestart` + +Data type: `Boolean` + +Boolean. It defines the service parameter hasrestart for nfs client services. + +Default value: `$nfs::params::client_services_hasrestart` + +##### `client_services_hasstatus` + +Data type: `Boolean` + +Boolean. It defines the service parameter hasstatus for nfs client services. + +Default value: `$nfs::params::client_services_hasstatus` + +##### `client_gssdopt_name` + +Data type: `String` + +String. It defines the name of the gssd option in /etc/default/nfs-common. + +Default value: `$nfs::params::client_gssdopt_name` + +### `nfs::client` + +Class: nfs::client + +This class exists to + 1. order the loading of classes + 2. including all needed classes for nfs as a client + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::client` class: + +* [`ensure`](#-nfs--client--ensure) +* [`nfs_v4`](#-nfs--client--nfs_v4) +* [`nfs_v4_mount_root`](#-nfs--client--nfs_v4_mount_root) +* [`nfs_v4_idmap_domain`](#-nfs--client--nfs_v4_idmap_domain) + +##### `ensure` + +Data type: `String` + +The ensure parameter is used to determine if the nfs client should be configured +and running or not. Valid values are 'present' and 'absent'. Default is 'present'. + +Default value: `$nfs::ensure` + +##### `nfs_v4` + +Data type: `String` + +The nfs_v4 parameter is used to determine if the nfs client should use nfs version 4. +Valid values are 'true' and 'false'. Default is 'false'. + +Default value: `$nfs::nfs_v4_client` + +##### `nfs_v4_mount_root` + +Data type: `String` + +The nfs_v4_mount_root parameter is used to determine the root directory for nfs version 4 mounts. +Default is '/mnt'. + +Default value: `$nfs::nfs_v4_mount_root` + +##### `nfs_v4_idmap_domain` + +Data type: `String` + +The nfs_v4_idmap_domain parameter is used to determine the domain for nfs version 4 id mapping. +Default is 'localdomain'. + +Default value: `$nfs::nfs_v4_idmap_domain` + +### `nfs::client::config` + +Class: nfs::client::config +This Function exists to + 1. configure nfs as a client + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::client::package` + +Class: nfs::client::package + +This Function exists to + 1. install needed packages for nfs clients + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::client::service` + +Class: nfs::client::service + +This Function exists to + 1. manage the needed services for nfs clients + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::params` + +Class: nfs::params + +This class exists to +1. Declutter the default value assignment for class parameters. +2. Manage internally used module variables in a central place. + +Therefore, many operating system dependent differences (names, paths, ...) +are addressed in here. + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::server` + +This class exists to + 1. order the loading of classes + 2. including all needed classes for nfs as a server + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::server` class: + +* [`ensure`](#-nfs--server--ensure) +* [`nfs_v4`](#-nfs--server--nfs_v4) +* [`nfs_v4_export_root`](#-nfs--server--nfs_v4_export_root) +* [`nfs_v4_export_root_clients`](#-nfs--server--nfs_v4_export_root_clients) +* [`nfs_v4_idmap_domain`](#-nfs--server--nfs_v4_idmap_domain) +* [`nfs_v4_root_export_ensure`](#-nfs--server--nfs_v4_root_export_ensure) +* [`nfs_v4_root_export_mount`](#-nfs--server--nfs_v4_root_export_mount) +* [`nfs_v4_root_export_remounts`](#-nfs--server--nfs_v4_root_export_remounts) +* [`nfs_v4_root_export_atboot`](#-nfs--server--nfs_v4_root_export_atboot) +* [`nfs_v4_root_export_options`](#-nfs--server--nfs_v4_root_export_options) +* [`nfs_v4_root_export_bindmount`](#-nfs--server--nfs_v4_root_export_bindmount) +* [`nfs_v4_root_export_tag`](#-nfs--server--nfs_v4_root_export_tag) + +##### `ensure` + +Data type: `Enum['present', 'absent', 'running', 'stopped', 'disabled']` + + + +Default value: `$nfs::ensure` + +##### `nfs_v4` + +Data type: `Boolean` + + + +Default value: `$nfs::nfs_v4` + +##### `nfs_v4_export_root` + +Data type: `String` + + + +Default value: `$nfs::nfs_v4_export_root` + +##### `nfs_v4_export_root_clients` + +Data type: `String` + + + +Default value: `$nfs::nfs_v4_export_root_clients` + +##### `nfs_v4_idmap_domain` + +Data type: `String` + + + +Default value: `$nfs::nfs_v4_idmap_domain` + +##### `nfs_v4_root_export_ensure` + +Data type: `String` + + + +Default value: `$nfs::nfs_v4_root_export_ensure` + +##### `nfs_v4_root_export_mount` + +Data type: `Optional[String]` + + + +Default value: `$nfs::nfs_v4_root_export_mount` + +##### `nfs_v4_root_export_remounts` + +Data type: `Boolean` + + + +Default value: `$nfs::nfs_v4_root_export_remounts` + +##### `nfs_v4_root_export_atboot` + +Data type: `Boolean` + + + +Default value: `$nfs::nfs_v4_root_export_atboot` + +##### `nfs_v4_root_export_options` + +Data type: `String` + + + +Default value: `$nfs::nfs_v4_root_export_options` + +##### `nfs_v4_root_export_bindmount` + +Data type: `Optional[String]` + + + +Default value: `$nfs::nfs_v4_root_export_bindmount` + +##### `nfs_v4_root_export_tag` + +Data type: `Optional[String]` + + + +Default value: `$nfs::nfs_v4_root_export_tag` + +### `nfs::server::config` + +Class: nfs::server::config + +This class exists to + 1. configure nfs as a server + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::server::package` + +Class: nfs::server::package + +This Function exists to + 1. install needed packages for nfs server + +* Daniel Klockenkaemper +* Martin Alfke + +### `nfs::server::service` + +Class: nfs::server::service + +This Function exists to + 1. manage the needed services for nfs server + +* Daniel Klockenkaemper +* Martin Alfke + +## Defined types + +### `nfs::client::mount` + +Function: nfs::client::mount + +This Function exists to + 1. manage all mounts on a nfs client + +Parameters + +param nfs_v4 + Boolean. When set to true, it uses nfs version 4 to mount a share. + +class { '::nfs': + client_enabled => true, + nfs_v4_client => true +} + +nfs::client::mount { '/target/directory': + server => '1.2.3.4', + share => 'share_name_on_nfs_server', + remounts => true, + atboot => true, + options_nfsv4 => 'tcp,nolock,rsize=32768,wsize=32768,intr,noatime,actimeo=3' +} + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::client::mount` defined type: + +* [`server`](#-nfs--client--mount--server) +* [`share`](#-nfs--client--mount--share) +* [`ensure`](#-nfs--client--mount--ensure) +* [`remounts`](#-nfs--client--mount--remounts) +* [`atboot`](#-nfs--client--mount--atboot) +* [`options_nfsv4`](#-nfs--client--mount--options_nfsv4) +* [`options_nfs`](#-nfs--client--mount--options_nfs) +* [`bindmount`](#-nfs--client--mount--bindmount) +* [`nfstag`](#-nfs--client--mount--nfstag) +* [`owner`](#-nfs--client--mount--owner) +* [`group`](#-nfs--client--mount--group) +* [`mode`](#-nfs--client--mount--mode) +* [`mount_root`](#-nfs--client--mount--mount_root) +* [`mount`](#-nfs--client--mount--mount) +* [`manage_packages`](#-nfs--client--mount--manage_packages) +* [`client_packages`](#-nfs--client--mount--client_packages) +* [`nfs_v4`](#-nfs--client--mount--nfs_v4) + +##### `server` + +Data type: `String[1]` + +String. Sets the ip address of the server with the nfs export + +##### `share` + +Data type: `Optional[String[1]]` + +String. Sets the name of the nfs share on the server + +Default value: `undef` + +##### `ensure` + +Data type: `String[1]` + +String. Sets the ensure parameter of the mount. + +Default value: `'mounted'` + +##### `remounts` + +Data type: `Boolean` + +String. Sets the remounts parameter of the mount. + +Default value: `false` + +##### `atboot` + +Data type: `Boolean` + +String. Sets the atboot parameter of the mount. + +Default value: `false` + +##### `options_nfsv4` + +Data type: `String[1]` + +String. Sets the mount options for a nfs version 4 mount. + +Default value: `$nfs::client_nfsv4_options` + +##### `options_nfs` + +Data type: `String[1]` + +String. Sets the mount options for a nfs mount. + +Default value: `$nfs::client_nfs_options` + +##### `bindmount` + +Data type: `Optional[String[1]]` + +String. When not undef it will create a bindmount on the node +for the nfs mount. + +Default value: `undef` + +##### `nfstag` + +Data type: `Optional[String[1]]` + +String. Sets the nfstag parameter of the mount. + +Default value: `undef` + +##### `owner` + +Data type: `Optional[String[1]]` + +String. Set owner of mount dir + +Default value: `undef` + +##### `group` + +Data type: `Optional[String[1]]` + +String. Set group of mount dir + +Default value: `undef` + +##### `mode` + +Data type: `Optional[String[1]]` + +String. Set mode of mount dir + +Default value: `undef` + +##### `mount_root` + +Data type: `Optional[String[1]]` + +String. Overwrite mount root if differs from server config + +Default value: `undef` + +##### `mount` + +Data type: `String[1]` + + + +Default value: `$title` + +##### `manage_packages` + +Data type: `Boolean` + + + +Default value: `$nfs::manage_packages` + +##### `client_packages` + +Data type: `Optional[Variant[String[1], Array[String[1]]]]` + + + +Default value: `$nfs::effective_client_packages` + +##### `nfs_v4` + +Data type: `Boolean` + + + +Default value: `$nfs::client::nfs_v4` + +### `nfs::functions::bindmount` + +Function: nfs::functions::bindmount + +This Function exists to + 1. manage bindmounts + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::functions::bindmount` defined type: + +* [`mount_name`](#-nfs--functions--bindmount--mount_name) +* [`ensure`](#-nfs--functions--bindmount--ensure) + +##### `mount_name` + +Data type: `Optional[String[1]]` + +String. Sets the target directory for the bindmount + +Default value: `undef` + +##### `ensure` + +Data type: `String[1]` + +String. Sets if enabled or not. + +Default value: `'present'` + +### `nfs::functions::create_export` + +Function: nfs::functions::create_export + +This Function exists to + 1. manage export creation + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::functions::create_export` defined type: + +* [`clients`](#-nfs--functions--create_export--clients) +* [`ensure`](#-nfs--functions--create_export--ensure) +* [`owner`](#-nfs--functions--create_export--owner) +* [`group`](#-nfs--functions--create_export--group) +* [`mode`](#-nfs--functions--create_export--mode) + +##### `clients` + +Data type: `Variant[String[1], Array[String[1]]]` + +String or Array. Sets the clients allowed to mount the export with options. + +##### `ensure` + +Data type: `String[1]` + +String. Sets if enabled or not. + +Default value: `'present'` + +##### `owner` + +Data type: `Optional[String[1]]` + +String. Sets the owner of the exported directory. + +Default value: `undef` + +##### `group` + +Data type: `Optional[String[1]]` + +String. Sets the group of the exported directory. + +Default value: `undef` + +##### `mode` + +Data type: `Optional[String[1]]` + +String. Sets the permissions of the exported directory. + +Default value: `undef` + +### `nfs::functions::mkdir` + +Function: nfs::functions::mkdir + +This Function exists to + 1. manage dir creation + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::functions::mkdir` defined type: + +* [`ensure`](#-nfs--functions--mkdir--ensure) + +##### `ensure` + +Data type: `String[1]` + + + +Default value: `'present'` + +### `nfs::functions::nfsv4_bindmount` + +Function: nfs::functions::nfsv4_bindmount + +This Function exists to + 1. manage bindmounts for nfs4 + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::functions::nfsv4_bindmount` defined type: + +* [`v4_export_name`](#-nfs--functions--nfsv4_bindmount--v4_export_name) +* [`bind`](#-nfs--functions--nfsv4_bindmount--bind) +* [`ensure`](#-nfs--functions--nfsv4_bindmount--ensure) + +##### `v4_export_name` + +Data type: `String[1]` + +String. Sets the target directory for the bindmount + +##### `bind` + +Data type: `String[1]` + +String. Sets the bindmount options. + +##### `ensure` + +Data type: `String[1]` + +String. Sets if mounted or not. + +Default value: `'mounted'` + +### `nfs::server::export` + +Function: nfs::server::export + +This Function exists to + 1. manage all exported resources on a nfs server + +Parameters + +class { '::nfs': + server_enabled => true, + nfs_v4 => true, + nfs_v4_export_root => '/share', + nfs_v4_export_root_clients => '1.2.3.4/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)', +} + +nfs::server::export { '/srv/nfs_exported/directory': + clients => '1.2.3.4/24(rw,insecure,no_subtree_check,async,no_root_squash) 5.6.7.8/24(ro)', + share => 'share_name_on_nfs_server', +} + +Links + +* {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] + + +* Daniel Klockenkaemper +* Martin Alfke + +#### Parameters + +The following parameters are available in the `nfs::server::export` defined type: + +* [`clients`](#-nfs--server--export--clients) +* [`bind`](#-nfs--server--export--bind) +* [`ensure`](#-nfs--server--export--ensure) +* [`remounts`](#-nfs--server--export--remounts) +* [`atboot`](#-nfs--server--export--atboot) +* [`options_nfsv4`](#-nfs--server--export--options_nfsv4) +* [`options_nfs`](#-nfs--server--export--options_nfs) +* [`bindmount`](#-nfs--server--export--bindmount) +* [`nfstag`](#-nfs--server--export--nfstag) +* [`mount`](#-nfs--server--export--mount) +* [`owner`](#-nfs--server--export--owner) +* [`group`](#-nfs--server--export--group) +* [`mode`](#-nfs--server--export--mode) +* [`server`](#-nfs--server--export--server) +* [`v3_export_name`](#-nfs--server--export--v3_export_name) +* [`v4_export_name`](#-nfs--server--export--v4_export_name) +* [`nfsv4_bindmount_enable`](#-nfs--server--export--nfsv4_bindmount_enable) + +##### `clients` + +Data type: `String[1]` + +String or Array. Sets the allowed clients and options for the export in the exports file. +Defaults to localhost(ro) + +Default value: `'localhost(ro)'` + +##### `bind` + +Data type: `String[1]` + +String. Sets the bind options setted in /etc/fstab for the bindmounts created. +Defaults to rbind + +Default value: `'rbind'` + +##### `ensure` + +Data type: `String[1]` + +String. If enabled the mount will be created. Defaults to mounted + +Default value: `'mounted'` + +##### `remounts` + +Data type: `Boolean` + +String. Sets the remounts parameter of the mount. + +Default value: `false` + +##### `atboot` + +Data type: `Boolean` + +String. Sets the atboot parameter of the mount. + +Default value: `false` + +##### `options_nfsv4` + +Data type: `String[1]` + +String. Sets the mount options for a nfs version 4 exported resource mount. + +Default value: `$nfs::client_nfsv4_options` + +##### `options_nfs` + +Data type: `String[1]` + +String. Sets the mount options for a nfs exported resource mount. + +Default value: `$nfs::client_nfs_options` + +##### `bindmount` + +Data type: `Optional[String[1]]` + +String. When not undef it will create a bindmount on the node +for the nfs mount. + +Default value: `undef` + +##### `nfstag` + +Data type: `Optional[String[1]]` + +String. Sets the nfstag parameter of the mount. + +Default value: `undef` + +##### `mount` + +Data type: `Optional[String[1]]` + +String. Sets the mountpoint the client will mount the exported resource mount on. If undef +it defaults to the same path as on the server + +Default value: `undef` + +##### `owner` + +Data type: `Optional[String[1]]` + +String. Sets the owner of the exported directory + +Default value: `undef` + +##### `group` + +Data type: `Optional[String[1]]` + +String. Sets the group of the exported directory + +Default value: `undef` + +##### `mode` + +Data type: `Optional[String[1]]` + +String. Sets the permissions of the exported directory. + +Default value: `undef` + +##### `server` + +Data type: `String[1]` + +String. Sets the hostname clients will use to mount the exported resource. If undef it +defaults to the trusted certname + +Default value: `$facts['clientcert']` + +##### `v3_export_name` + +Data type: `String[1]` + + + +Default value: `$name` + +##### `v4_export_name` + +Data type: `String[1]` + + + +Default value: `regsubst($name, '.*/(.*)', '\1' )` + +##### `nfsv4_bindmount_enable` + +Data type: `Boolean` + + + +Default value: `$nfs::nfsv4_bindmount_enable` + diff --git a/manifests/client.pp b/manifests/client.pp index b49a4b8..d74e0c3 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -17,7 +17,7 @@ # @param nfs_v4_idmap_domain # The nfs_v4_idmap_domain parameter is used to determine the domain for nfs version 4 id mapping. # Default is 'localdomain'. -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/client/config.pp b/manifests/client/config.pp index 94ad2fe..d9e4c52 100644 --- a/manifests/client/config.pp +++ b/manifests/client/config.pp @@ -3,7 +3,7 @@ # This Function exists to # 1. configure nfs as a client # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/client/mount.pp b/manifests/client/mount.pp index 8f4142e..043ccc5 100644 --- a/manifests/client/mount.pp +++ b/manifests/client/mount.pp @@ -54,7 +54,7 @@ # @param client_packages # @param nfs_v4 # -# @examples +# @example # # class { '::nfs': # client_enabled => true, @@ -69,7 +69,7 @@ # options_nfsv4 => 'tcp,nolock,rsize=32768,wsize=32768,intr,noatime,actimeo=3' # } # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 5b6aa44..5b73156 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -4,7 +4,7 @@ # This Function exists to # 1. install needed packages for nfs clients # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/client/service.pp b/manifests/client/service.pp index 613684f..5531c65 100644 --- a/manifests/client/service.pp +++ b/manifests/client/service.pp @@ -4,7 +4,7 @@ # This Function exists to # 1. manage the needed services for nfs clients # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/functions/bindmount.pp b/manifests/functions/bindmount.pp index 455aa3b..faf1abe 100644 --- a/manifests/functions/bindmount.pp +++ b/manifests/functions/bindmount.pp @@ -10,7 +10,7 @@ # @param ensure # String. Sets if enabled or not. # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/functions/create_export.pp b/manifests/functions/create_export.pp index ff74b26..b610135 100644 --- a/manifests/functions/create_export.pp +++ b/manifests/functions/create_export.pp @@ -19,7 +19,7 @@ # @param mode # String. Sets the permissions of the exported directory. # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/functions/mkdir.pp b/manifests/functions/mkdir.pp index fe0a6a6..97dd0a8 100644 --- a/manifests/functions/mkdir.pp +++ b/manifests/functions/mkdir.pp @@ -6,7 +6,7 @@ # # @param ensure # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/functions/nfsv4_bindmount.pp b/manifests/functions/nfsv4_bindmount.pp index 0934d2f..6435f28 100644 --- a/manifests/functions/nfsv4_bindmount.pp +++ b/manifests/functions/nfsv4_bindmount.pp @@ -13,11 +13,10 @@ # @param ensure # String. Sets if mounted or not. # -# === Authors -# +# @author # * Daniel Klockenkaemper +# * Martin Alfke # - define nfs::functions::nfsv4_bindmount ( String[1] $v4_export_name, String[1] $bind, diff --git a/manifests/init.pp b/manifests/init.pp index b0e5074..55f61af 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -157,10 +157,10 @@ # Boolean. It defines the service parameter hasstatus for nfs client services. # @param client_gssdopt_name # String. It defines the name of the gssd option in /etc/default/nfs-common. -# @examples +# @example # * {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/params.pp b/manifests/params.pp index 4ba905f..416e0c7 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -8,7 +8,7 @@ # Therefore, many operating system dependent differences (names, paths, ...) # are addressed in here. # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/server.pp b/manifests/server.pp index 29517f4..7b33793 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,13 +1,8 @@ # @summary Class: nfs::server -# # This class exists to # 1. order the loading of classes # 2. including all needed classes for nfs as a server # -# Links -# -# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] -# # @param ensure # @param nfs_v4 # @param nfs_v4_export_root @@ -21,7 +16,7 @@ # @param nfs_v4_root_export_bindmount # @param nfs_v4_root_export_tag # -# @authors +# @author # * Daniel Klockenkaemper # * Martin Alfke # diff --git a/manifests/server/config.pp b/manifests/server/config.pp index cc2c2de..989958a 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -1,19 +1,13 @@ -# == Class: nfs::server::config +# Class: nfs::server::config # +# @summary # This class exists to # 1. configure nfs as a server # -# -# === Links -# -# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] -# -# -# === Authors -# +# @author # * Daniel Klockenkaemper +# * Martin Alfke # - class nfs::server::config { concat { $nfs::exports_file: ensure => present, diff --git a/manifests/server/export.pp b/manifests/server/export.pp index 7e559d6..3b5a26b 100644 --- a/manifests/server/export.pp +++ b/manifests/server/export.pp @@ -76,7 +76,7 @@ # * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] # # -# @authors +# @author # # * Daniel Klockenkaemper # * Martin Alfke diff --git a/manifests/server/package.pp b/manifests/server/package.pp index 19e1290..3ee9128 100644 --- a/manifests/server/package.pp +++ b/manifests/server/package.pp @@ -1,19 +1,13 @@ -# == Class: nfs::server::package +# Class: nfs::server::package # +# @summary # This Function exists to # 1. install needed packages for nfs server # -# -# === Links -# -# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] -# -# -# === Authors -# +# @author # * Daniel Klockenkaemper +# * Martin Alfke # - class nfs::server::package { if $nfs::manage_packages { if $nfs::manage_server_service { diff --git a/manifests/server/service.pp b/manifests/server/service.pp index 3bc4400..7360d76 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -1,19 +1,13 @@ -# == Class: nfs::server::service +# Class: nfs::server::service # +# @summary # This Function exists to # 1. manage the needed services for nfs server # -# -# === Links -# -# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] -# -# -# === Authors -# +# @author # * Daniel Klockenkaemper +# * Martin Alfke # - class nfs::server::service { if $nfs::nfs_v4 == true { if $nfs::server_nfsv4_servicehelper != undef and $nfs::manage_server_servicehelper {