diff --git a/REFERENCE.md b/REFERENCE.md index d82c1cc..2b23f7c 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -6,36 +6,35 @@ ### 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 +The nfs class. -* {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] - -* Daniel Klockenkaemper -* Martin Alfke +* **See also** + * https://github.com/voxpupuli/puppet-nfs#examples + * Exemples #### Parameters @@ -106,18 +105,15 @@ The following parameters are available in the `nfs` class: Data type: `Enum['present', 'absent', 'running', 'stopped', 'disabled']` -String. Controls if the managed resources shall be present or -absent. If set to absent: +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, ...). +* Any traces of the packages will be purged as good as possible. This may include existing configuration files. + The exact behavior is provider dependent. +* 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'` @@ -125,8 +121,7 @@ Default value: `'present'` Data type: `Boolean` -Boolean. If set to true, this module will configure the node -to act as a nfs server. +If set to `true`, this module will configure the node to act as a NFS server. Default value: `false` @@ -134,9 +129,8 @@ Default value: `false` 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. +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` @@ -144,8 +138,7 @@ Default value: `false` Data type: `Boolean` -Boolean. If set to false, this module will not export any -resources as storeconfigs. Defaults to true. +If set to `false`, this module will not export any resources as storeconfigs. Default value: `true` @@ -153,8 +146,7 @@ Default value: `true` Data type: `Boolean` -Boolean. If set to true, this module will use nfs version 4 -for exporting and mounting nfs resources. +If set to `true`, this module will use NFS version 4 for exporting and mounting NFS resources. Default value: `false` @@ -162,9 +154,8 @@ Default value: `false` 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 +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. Default value: `false` @@ -172,8 +163,7 @@ Default value: `false` Data type: `Stdlib::Absolutepath` -String. It defines the location of file with the nfs export resources used -by the nfs server. +It defines the location of file with the NFS export resources used by the NFS server. Default value: `$nfs::params::exports_file` @@ -181,7 +171,7 @@ Default value: `$nfs::params::exports_file` Data type: `Stdlib::Absolutepath` -String. It defines the location of the file with the idmapd settings. +It defines the location of the file with the idmapd settings. Default value: `$nfs::params::idmapd_file` @@ -189,7 +179,7 @@ Default value: `$nfs::params::idmapd_file` Data type: `Optional[Stdlib::Absolutepath]` -String. It defines the location of the file with the nfs settings. +It defines the location of the file with the NFS settings. Default value: `$nfs::params::defaults_file` @@ -197,7 +187,7 @@ Default value: `$nfs::params::defaults_file` Data type: `Boolean` -Boolean. It defines if the packages should be managed through this module +It defines if the packages should be managed through this module. Default value: `true` @@ -205,8 +195,7 @@ Default value: `true` Data type: `Array` -Array. It defines the packages needed to be installed for acting as -a nfs server +It defines the packages needed to be installed for acting as a NFS server. Default value: `$nfs::params::server_packages` @@ -214,8 +203,7 @@ Default value: `$nfs::params::server_packages` Data type: `String` -String. It defines the packages state - any of present, installed, -absent, purged, held, latest +It defines the packages state - any of `present`, `installed`, `absent`, `purged`, `held`, `latest`. Default value: `'installed'` @@ -223,8 +211,7 @@ Default value: `'installed'` Data type: `Array` -Array. It defines the packages needed to be installed for acting as -a nfs client +It defines the packages needed to be installed for acting as a NFS client Default value: `$nfs::params::client_packages` @@ -232,8 +219,7 @@ Default value: `$nfs::params::client_packages` Data type: `String` -String. It defines the packages state - any of present, installed, -absent, purged, held, latest +It defines the packages state - any of `present`, `installed`, `absent`, `purged`, `held`, `latest`. Default value: `'installed'` @@ -241,7 +227,7 @@ Default value: `'installed'` Data type: `Boolean` -Boolean. Defines if module should manage server_service +Defines if module should manage server_service. Default value: `true` @@ -249,7 +235,7 @@ Default value: `true` Data type: `Boolean` -Boolean. Defines if module should manage server_servicehelper +Defines if module should manage server_servicehelper. Default value: `true` @@ -257,7 +243,7 @@ Default value: `true` Data type: `Boolean` -Boolean. Defines if module should manage client_service +Defines if module should manage client_service. Default value: `true` @@ -265,7 +251,7 @@ Default value: `true` Data type: `String` -String. It defines the servicename of the nfs server service +It defines the servicename of the NFS server service. Default value: `$nfs::params::server_service_name` @@ -273,7 +259,7 @@ Default value: `$nfs::params::server_service_name` Data type: `Enum['present', 'absent', 'running', 'stopped', 'disabled']` -Boolean. It defines the service parameter ensure for nfs server services. +It defines the service parameter ensure for NFS server services. Default value: `'running'` @@ -281,7 +267,7 @@ Default value: `'running'` Data type: `Boolean` -Boolean. It defines the service parameter enable for nfs server service. +It defines the service parameter enable for NFS server service. Default value: `true` @@ -289,7 +275,7 @@ Default value: `true` Data type: `Boolean` -Boolean. It defines the service parameter hasrestart for nfs server service. +It defines the service parameter hasrestart for NFS server service. Default value: `$nfs::params::server_service_hasrestart` @@ -297,7 +283,7 @@ Default value: `$nfs::params::server_service_hasrestart` Data type: `Boolean` -Boolean. It defines the service parameter hasstatus for nfs server service. +It defines the service parameter hasstatus for NFS server service. Default value: `$nfs::params::server_service_hasstatus` @@ -305,7 +291,7 @@ Default value: `$nfs::params::server_service_hasstatus` Data type: `Optional[String]` -String. It defines the service parameter restart for nfs server service. +It defines the service parameter restart for NFS server service. Default value: `$nfs::params::server_service_restart_cmd` @@ -313,8 +299,7 @@ Default value: `$nfs::params::server_service_restart_cmd` Data type: `Optional[Array]` -Array. It defines the service helper like idmapd for servers configured with -nfs version 4. +It defines the service helper like idmapd for servers configured with NFS version 4. Default value: `$nfs::params::server_nfsv4_servicehelper` @@ -322,7 +307,7 @@ Default value: `$nfs::params::server_nfsv4_servicehelper` Data type: `Hash` -Nested Hash. It defines the servicenames need to be started when acting as a nfs client +It defines the servicenames need to be started when acting as a NFS client. Default value: `$nfs::params::client_services` @@ -330,8 +315,7 @@ Default value: `$nfs::params::client_services` Data type: `Hash` -Nested Hash. It defines the servicenames need to be started when acting as a nfs client -version 4. +It defines the servicenames need to be started when acting as a NFS client version 4. Default value: `$nfs::params::client_nfsv4_services` @@ -339,7 +323,7 @@ Default value: `$nfs::params::client_nfsv4_services` Data type: `Boolean` -Boolean. It defines the service parameter enable for nfs client services. +It defines the service parameter enable for NFS client services. Default value: `$nfs::params::client_services_enable` @@ -347,8 +331,7 @@ Default value: `$nfs::params::client_services_enable` Data type: `Array[String]` -Array. It defines the Augeas parameter added in @param defaults_file when acting as a nfs -version 4 client. +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` @@ -356,8 +339,7 @@ Default value: `$nfs::params::client_idmapd_setting` Data type: `String` -String. It defines the name of the nfs filesystem, when adding entries to /etc/fstab -on a client node. +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` @@ -365,8 +347,7 @@ Default value: `$nfs::params::client_nfs_fstype` Data type: `String` -String. It defines the options for the nfs filesystem, when adding entries to /etc/fstab -on a client node. +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` @@ -374,8 +355,7 @@ Default value: `$nfs::params::client_nfs_options` Data type: `String` -String. It defines the name of the nfs version 4 filesystem, when adding entries -to /etc/fstab on a client node. +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` @@ -383,8 +363,7 @@ Default value: `$nfs::params::client_nfsv4_fstype` Data type: `String` -String. It defines the options for the nfs version 4filesystem, when adding entries -to /etc/fstab on a client node. +It defines the options for the NFS version 4 filesystem, when adding entries to `/etc/fstab` on a client node. Default value: `$nfs::params::client_nfsv4_options` @@ -392,8 +371,7 @@ Default value: `$nfs::params::client_nfsv4_options` Data type: `String` -String. It defines the location where nfs version 4 exports should be bindmounted to -on a server node. Defaults to /export. +It defines the location where NFS version 4 exports should be bindmounted to on a server node. Default value: `'/export'` @@ -401,9 +379,7 @@ Default value: `'/export'` 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). +It defines the clients that are allowed to mount NFS version 4 exports and includes the option string. Default value: `"*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"` @@ -411,8 +387,7 @@ Default value: `"*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_sub Data type: `String` -String. It defines the location where nfs version 4 clients find the mount root -on a server node. Defaults to /srv. +It defines the location where NFS version 4 clients find the mount root on a server node. Default value: `'/srv'` @@ -420,9 +395,8 @@ Default value: `'/srv'` 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. +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. Default value: `$nfs::params::nfs_v4_idmap_domain` @@ -430,8 +404,7 @@ Default value: `$nfs::params::nfs_v4_idmap_domain` Data type: `Boolean` -Boolean. It defines if the module should create a bindmount for the export. -Defaults to true. +It defines if the module should create a bindmount for the export. Default value: `true` @@ -439,7 +412,7 @@ Default value: `true` Data type: `Boolean` -Boolean. If true, sets NEED_GSSD=yes in /etc/defauls/nfs-common, usable on Debian/Ubuntu +If `true`, sets `NEED_GSSD=yes` in `/etc/defauls/nfs-common`, usable on Debian/Ubuntu. Default value: `false` @@ -447,7 +420,7 @@ Default value: `false` Data type: `Boolean` -Boolean. If true enable rpc-gssd service. +If `true` enable rpc-gssd service. Default value: `false` @@ -455,7 +428,7 @@ Default value: `false` Data type: `String` -String. Options for rpc-gssd service. Defaults to '' +Options for rpc-gssd service. Default value: `$nfs::params::client_gssd_options` @@ -463,7 +436,7 @@ Default value: `$nfs::params::client_gssd_options` Data type: `Boolean` -Boolean. If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9 +If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9. Default value: `false` @@ -471,7 +444,7 @@ Default value: `false` Data type: `Variant[String, Array]` -String or Array. 'Local-Realms' option for idmapd. Defaults to '' +`Local-Realms` option for idmapd. Default value: `''` @@ -479,7 +452,7 @@ Default value: `''` Data type: `Integer` -Integer. 'Cache-Expiration' option for idmapd. Defaults to 0 - unused. +`Cache-Expiration` option for idmapd. If `0` cache is unused. Default value: `0` @@ -487,7 +460,7 @@ Default value: `0` Data type: `Boolean` -Boolean. Enable setting Nobody mapping in idmapd. Defaults to false. +Enable setting Nobody mapping in idmapd. Default value: `false` @@ -495,7 +468,7 @@ Default value: `false` Data type: `String` -String. 'Nobody-User' option for idmapd. Defaults to nobody. +`Nobody-User` option for idmapd. Default value: `$nfs::params::nfs_v4_idmap_nobody_user` @@ -503,7 +476,7 @@ Default value: `$nfs::params::nfs_v4_idmap_nobody_user` Data type: `String` -String. 'Nobody-Group' option for idmapd. Defaults to nobody or nogroup. +`Nobody-Group` option for idmapd. Default value: `$nfs::params::nfs_v4_idmap_nobody_group` @@ -511,7 +484,7 @@ Default value: `$nfs::params::nfs_v4_idmap_nobody_group` Data type: `Optional[Stdlib::Absolutepath]` -String. It defines the location of the file with the rpcbind config. +It defines the location of the file with the rpcbind config. Default value: `$nfs::params::client_rpcbind_config` @@ -519,7 +492,7 @@ Default value: `$nfs::params::client_rpcbind_config` Data type: `Optional[String]` -String. It defines the name of env variable that holds the rpcbind config. E.g. OPTIONS for Debian +It defines the name of environment variable that holds the rpcbind config. E.g. OPTIONS for Debian. Default value: `$nfs::params::client_rpcbind_optname` @@ -527,7 +500,7 @@ Default value: `$nfs::params::client_rpcbind_optname` Data type: `Optional[String]` -String. Options for rpcbind service. +Options for rpcbind service. Default value: `undef` @@ -535,7 +508,7 @@ Default value: `undef` Data type: `String` -String. It defines the state of the nfs version 4 root export. Defaults to mounted. +It defines the state of the NFS version 4 root export. Default value: `'mounted'` @@ -543,7 +516,7 @@ Default value: `'mounted'` Data type: `Optional[String]` -String. It defines the mountpoint of the nfs version 4 root export. Defaults to undef. +It defines the mountpoint of the NFS version 4 root export. Default value: `undef` @@ -551,7 +524,7 @@ Default value: `undef` Data type: `Boolean` -Boolean. It defines if the nfs version 4 root export should be remounted. Defaults to false. +It defines if the NFS version 4 root export should be remounted. Default value: `false` @@ -559,7 +532,7 @@ Default value: `false` Data type: `Boolean` -Boolean. It defines if the nfs version 4 root export should be mounted at boot. Defaults to false. +It defines if the NFS version 4 root export should be mounted at boot. Default value: `false` @@ -567,7 +540,7 @@ Default value: `false` Data type: `String` -String. It defines the options for the nfs version 4 root export. Defaults to _netdev. +It defines the options for the NFS version 4 root export. Default value: `'_netdev'` @@ -575,7 +548,7 @@ Default value: `'_netdev'` Data type: `Optional[String]` -String. It defines the bindmount of the nfs version 4 root export. Defaults to undef. +It defines the bindmount of the NFS version 4 root export. Default value: `undef` @@ -583,7 +556,7 @@ Default value: `undef` Data type: `Optional[String]` -String. It defines the tag of the nfs version 4 root export. Defaults to undef. +It defines the tag of the NFS version 4 root export. Default value: `undef` @@ -591,7 +564,7 @@ Default value: `undef` Data type: `Optional[Hash]` -Hash. It defines the servicename of the rpc-gssd service. +It defines the servicename of the rpc-gssd service. Default value: `$nfs::params::client_gssd_service_name` @@ -599,7 +572,7 @@ Default value: `$nfs::params::client_gssd_service_name` Data type: `Boolean` -Boolean. It defines the service parameter hasrestart for nfs client services. +It defines the service parameter hasrestart for NFS client services. Default value: `$nfs::params::client_services_hasrestart` @@ -607,7 +580,7 @@ Default value: `$nfs::params::client_services_hasrestart` Data type: `Boolean` -Boolean. It defines the service parameter hasstatus for nfs client services. +It defines the service parameter hasstatus for NFS client services. Default value: `$nfs::params::client_services_hasstatus` @@ -615,20 +588,15 @@ Default value: `$nfs::params::client_services_hasstatus` Data type: `String` -String. It defines the name of the gssd option in /etc/default/nfs-common. +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 +This class exists to: +1. Order the loading of classes, +2. Including all needed classes for NFS as a client. #### Parameters @@ -643,8 +611,7 @@ The following parameters are available in the `nfs::client` class: 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'. +The ensure parameter is used to determine if the NFS client should be configured and running or not. Default value: `$nfs::ensure` @@ -652,8 +619,7 @@ Default value: `$nfs::ensure` Data type: `Boolean` -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'. +The nfs_v4 parameter is used to determine if the NFS client should use NFS version 4. Default value: `$nfs::nfs_v4_client` @@ -661,8 +627,7 @@ Default value: `$nfs::nfs_v4_client` Data type: `String` -The nfs_v4_mount_root parameter is used to determine the root directory for nfs version 4 mounts. -Default is '/mnt'. +The nfs_v4_mount_root parameter is used to determine the root directory for NFS version 4 mounts. Default value: `$nfs::nfs_v4_mount_root` @@ -670,62 +635,35 @@ Default value: `$nfs::nfs_v4_mount_root` Data type: `String` -The nfs_v4_idmap_domain parameter is used to determine the domain for nfs version 4 id mapping. -Default is 'localdomain'. +The nfs_v4_idmap_domain parameter is used to determine the domain for NFS version 4 id mapping. 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 +Configure NFS as a client. ### `nfs::client::package` -Class: nfs::client::package - -This Function exists to - 1. install needed packages for nfs clients - -* Daniel Klockenkaemper -* Martin Alfke +Install needed packages for NFS clients. ### `nfs::client::service` -Class: nfs::client::service - -This Function exists to - 1. manage the needed services for nfs clients - -* Daniel Klockenkaemper -* Martin Alfke +Manage the needed services for NFS clients. ### `nfs::params` -Class: nfs::params - This class exists to -1. Declutter the default value assignment for class parameters. +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 +Therefore, many operating system dependent differences (names, paths, ...) are addressed in here. ### `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 +This class exists to: +1. Order the loading of classes, +2. Including all needed classes for NFS as a server. #### Parameters @@ -842,48 +780,28 @@ 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 +Configure NFS as a server. ### `nfs::server::package` -Class: nfs::server::package - -This Function exists to - 1. install needed packages for nfs server - -* Daniel Klockenkaemper -* Martin Alfke +Install needed packages for NFS server. ### `nfs::server::service` -Class: nfs::server::service - -This Function exists to - 1. manage the needed services for nfs server - -* Daniel Klockenkaemper -* Martin Alfke +Manage the needed services for NFS server. ## Defined types ### `nfs::client::mount` -Function: nfs::client::mount - -This Function exists to - 1. manage all mounts on a nfs client +param nfs_v4 + When set to true, it uses NFS version 4 to mount a share. -Parameters +#### Examples -param nfs_v4 - Boolean. When set to true, it uses nfs version 4 to mount a share. +##### +```puppet class { '::nfs': client_enabled => true, nfs_v4_client => true @@ -896,9 +814,7 @@ nfs::client::mount { '/target/directory': atboot => true, options_nfsv4 => 'tcp,nolock,rsize=32768,wsize=32768,intr,noatime,actimeo=3' } - -* Daniel Klockenkaemper -* Martin Alfke +``` #### Parameters @@ -926,13 +842,13 @@ The following parameters are available in the `nfs::client::mount` defined type: Data type: `String[1]` -String. Sets the ip address of the server with the nfs export +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 +Sets the name of the NFS share on the server. Default value: `undef` @@ -940,7 +856,7 @@ Default value: `undef` Data type: `String[1]` -String. Sets the ensure parameter of the mount. +Sets the ensure parameter of the mount. Default value: `'mounted'` @@ -948,7 +864,7 @@ Default value: `'mounted'` Data type: `Boolean` -String. Sets the remounts parameter of the mount. +Sets the remounts parameter of the mount. Default value: `false` @@ -956,7 +872,7 @@ Default value: `false` Data type: `Boolean` -String. Sets the atboot parameter of the mount. +Sets the atboot parameter of the mount. Default value: `false` @@ -964,7 +880,7 @@ Default value: `false` Data type: `String[1]` -String. Sets the mount options for a nfs version 4 mount. +Sets the mount options for a NFS version 4 mount. Default value: `$nfs::client_nfsv4_options` @@ -972,7 +888,7 @@ Default value: `$nfs::client_nfsv4_options` Data type: `String[1]` -String. Sets the mount options for a nfs mount. +Sets the mount options for a NFS mount. Default value: `$nfs::client_nfs_options` @@ -980,8 +896,7 @@ Default value: `$nfs::client_nfs_options` Data type: `Optional[String[1]]` -String. When not undef it will create a bindmount on the node -for the nfs mount. +When not undef it will create a bindmount on the node for the NFS mount. Default value: `undef` @@ -989,7 +904,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the nfstag parameter of the mount. +Sets the nfstag parameter of the mount. Default value: `undef` @@ -997,7 +912,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Set owner of mount dir +Set owner of mount directory. Default value: `undef` @@ -1005,7 +920,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Set group of mount dir +Set group of mount directory. Default value: `undef` @@ -1013,7 +928,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Set mode of mount dir +Set mode of mount directory. Default value: `undef` @@ -1021,7 +936,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Overwrite mount root if differs from server config +Overwrite mount root if differs from server configuration. Default value: `undef` @@ -1059,13 +974,7 @@ Default value: `$nfs::client::nfs_v4` ### `nfs::functions::bindmount` -Function: nfs::functions::bindmount - -This Function exists to - 1. manage bindmounts - -* Daniel Klockenkaemper -* Martin Alfke +Manage bindmounts. #### Parameters @@ -1078,7 +987,7 @@ The following parameters are available in the `nfs::functions::bindmount` define Data type: `Optional[String[1]]` -String. Sets the target directory for the bindmount +Sets the target directory for the bindmount. Default value: `undef` @@ -1086,19 +995,13 @@ Default value: `undef` Data type: `String[1]` -String. Sets if enabled or not. +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 +Manage export creation. #### Parameters @@ -1114,13 +1017,13 @@ The following parameters are available in the `nfs::functions::create_export` de Data type: `Variant[String[1], Array[String[1]]]` -String or Array. Sets the clients allowed to mount the export with options. +Sets the clients allowed to mount the export with options. ##### `ensure` Data type: `String[1]` -String. Sets if enabled or not. +Sets if enabled or not. Default value: `'present'` @@ -1128,7 +1031,7 @@ Default value: `'present'` Data type: `Optional[String[1]]` -String. Sets the owner of the exported directory. +Sets the owner of the exported directory. Default value: `undef` @@ -1136,7 +1039,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the group of the exported directory. +Sets the group of the exported directory. Default value: `undef` @@ -1144,19 +1047,13 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the permissions of the exported directory. +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 +Manage directory creation. #### Parameters @@ -1174,13 +1071,7 @@ 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 +Manage bindmounts for NFS v4. #### Parameters @@ -1194,31 +1085,31 @@ The following parameters are available in the `nfs::functions::nfsv4_bindmount` Data type: `String[1]` -String. Sets the target directory for the bindmount +Sets the target directory for the bindmount. ##### `bind` Data type: `String[1]` -String. Sets the bindmount options. +Sets the bindmount options. ##### `ensure` Data type: `String[1]` -String. Sets if mounted or not. +Sets if mounted or not. Default value: `'mounted'` ### `nfs::server::export` -Function: nfs::server::export +Manage all exported resources on a NFS server. -This Function exists to - 1. manage all exported resources on a nfs server +#### Examples -Parameters +##### +```puppet class { '::nfs': server_enabled => true, nfs_v4 => true, @@ -1230,14 +1121,7 @@ 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 @@ -1265,8 +1149,7 @@ The following parameters are available in the `nfs::server::export` defined type Data type: `String[1]` -String or Array. Sets the allowed clients and options for the export in the exports file. -Defaults to localhost(ro) +Sets the allowed clients and options for the export in the exports file. Default value: `'localhost(ro)'` @@ -1274,8 +1157,7 @@ Default value: `'localhost(ro)'` Data type: `String[1]` -String. Sets the bind options setted in /etc/fstab for the bindmounts created. -Defaults to rbind +Sets the bind options setted in `/etc/fstab` for the bindmounts created. Default value: `'rbind'` @@ -1283,7 +1165,7 @@ Default value: `'rbind'` Data type: `String[1]` -String. If enabled the mount will be created. Defaults to mounted +If enabled the mount will be created. Default value: `'mounted'` @@ -1291,7 +1173,7 @@ Default value: `'mounted'` Data type: `Boolean` -String. Sets the remounts parameter of the mount. +Sets the remounts parameter of the mount. Default value: `false` @@ -1299,7 +1181,7 @@ Default value: `false` Data type: `Boolean` -String. Sets the atboot parameter of the mount. +Sets the atboot parameter of the mount. Default value: `false` @@ -1307,7 +1189,7 @@ Default value: `false` Data type: `String[1]` -String. Sets the mount options for a nfs version 4 exported resource mount. +Sets the mount options for a NFS version 4 exported resource mount. Default value: `$nfs::client_nfsv4_options` @@ -1315,7 +1197,7 @@ Default value: `$nfs::client_nfsv4_options` Data type: `String[1]` -String. Sets the mount options for a nfs exported resource mount. +Sets the mount options for a NFS exported resource mount. Default value: `$nfs::client_nfs_options` @@ -1323,8 +1205,7 @@ Default value: `$nfs::client_nfs_options` Data type: `Optional[String[1]]` -String. When not undef it will create a bindmount on the node -for the nfs mount. +When not undef it will create a bindmount on the node for the NFS mount. Default value: `undef` @@ -1332,7 +1213,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the nfstag parameter of the mount. +Sets the nfstag parameter of the mount. Default value: `undef` @@ -1340,8 +1221,8 @@ Default value: `undef` 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 +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` @@ -1349,7 +1230,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the owner of the exported directory +Sets the owner of the exported directory. Default value: `undef` @@ -1357,7 +1238,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the group of the exported directory +Sets the group of the exported directory. Default value: `undef` @@ -1365,7 +1246,7 @@ Default value: `undef` Data type: `Optional[String[1]]` -String. Sets the permissions of the exported directory. +Sets the permissions of the exported directory. Default value: `undef` @@ -1373,8 +1254,7 @@ Default value: `undef` Data type: `String[1]` -String. Sets the hostname clients will use to mount the exported resource. If undef it -defaults to the trusted certname +Sets the hostname clients will use to mount the exported resource. If undef it defaults to the trusted certname. Default value: `$facts['clientcert']` diff --git a/manifests/client.pp b/manifests/client.pp index 3826e33..dc49dd5 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -1,25 +1,24 @@ -# Class: nfs::client +# @summary Manage the NFS client # -# @summary -# This class exists to -# 1. order the loading of classes -# 2. including all needed classes for nfs as a client +# This class exists to: +# 1. Order the loading of classes, +# 2. Including all needed classes for NFS as a client. # # @param ensure -# 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'. +# The ensure parameter is used to determine if the NFS client should be configured and running or not. +# # @param nfs_v4 -# 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'. +# The nfs_v4 parameter is used to determine if the NFS client should use NFS version 4. +# # @param nfs_v4_mount_root -# The nfs_v4_mount_root parameter is used to determine the root directory for nfs version 4 mounts. -# Default is '/mnt'. +# The nfs_v4_mount_root parameter is used to determine the root directory for NFS version 4 mounts. +# # @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'. +# The nfs_v4_idmap_domain parameter is used to determine the domain for NFS version 4 id mapping. +# # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::client ( String $ensure = $nfs::ensure, diff --git a/manifests/client/config.pp b/manifests/client/config.pp index d9e4c52..4a8024a 100644 --- a/manifests/client/config.pp +++ b/manifests/client/config.pp @@ -1,11 +1,8 @@ -# Class: nfs::client::config -# @summary -# This Function exists to -# 1. configure nfs as a client +# @summary Configure NFS as a client. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::client::config { if $nfs::client::nfs_v4 { diff --git a/manifests/client/mount.pp b/manifests/client/mount.pp index 043ccc5..5e78636 100644 --- a/manifests/client/mount.pp +++ b/manifests/client/mount.pp @@ -1,53 +1,46 @@ -# Function: nfs::client::mount -# -# @summary -# This Function exists to -# 1. manage all mounts on a nfs client -# -# Parameters +# @summary Manage all mounts on a NFS client. # # @param server -# String. Sets the ip address of the server with the nfs export +# Sets the ip address of the server with the NFS export. # # @param share -# String. Sets the name of the nfs share on the server +# Sets the name of the NFS share on the server. # # @param ensure -# String. Sets the ensure parameter of the mount. +# Sets the ensure parameter of the mount. # # @param remounts -# String. Sets the remounts parameter of the mount. +# Sets the remounts parameter of the mount. # # @param atboot -# String. Sets the atboot parameter of the mount. +# Sets the atboot parameter of the mount. # # @param options_nfsv4 -# String. Sets the mount options for a nfs version 4 mount. +# Sets the mount options for a NFS version 4 mount. # # @param options_nfs -# String. Sets the mount options for a nfs mount. +# Sets the mount options for a NFS mount. # # @param bindmount -# String. When not undef it will create a bindmount on the node -# for the nfs mount. +# When not undef it will create a bindmount on the node for the NFS mount. # # @param nfstag -# String. Sets the nfstag parameter of the mount. +# Sets the nfstag parameter of the mount. # # param nfs_v4 -# Boolean. When set to true, it uses nfs version 4 to mount a share. +# When set to true, it uses NFS version 4 to mount a share. # # @param owner -# String. Set owner of mount dir +# Set owner of mount directory. # # @param group -# String. Set group of mount dir +# Set group of mount directory. # # @param mode -# String. Set mode of mount dir +# Set mode of mount directory. # # @param mount_root -# String. Overwrite mount root if differs from server config +# Overwrite mount root if differs from server configuration. # # @param mount # @param manage_packages @@ -55,23 +48,22 @@ # @param nfs_v4 # # @example -# -# 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' -# } +# 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' +# } # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::client::mount ( String[1] $server, diff --git a/manifests/client/package.pp b/manifests/client/package.pp index 5b73156..5fd3154 100644 --- a/manifests/client/package.pp +++ b/manifests/client/package.pp @@ -1,12 +1,8 @@ -# Class: nfs::client::package -# -# @summary -# This Function exists to -# 1. install needed packages for nfs clients +# @summary Install needed packages for NFS clients. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::client::package { if $nfs::manage_packages { diff --git a/manifests/client/service.pp b/manifests/client/service.pp index 5531c65..f985960 100644 --- a/manifests/client/service.pp +++ b/manifests/client/service.pp @@ -1,12 +1,8 @@ -# Class: nfs::client::service -# -# @summary -# This Function exists to -# 1. manage the needed services for nfs clients +# @summary Manage the needed services for NFS clients. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::client::service { if $nfs::client::nfs_v4 { diff --git a/manifests/functions/bindmount.pp b/manifests/functions/bindmount.pp index faf1abe..8b2aa2a 100644 --- a/manifests/functions/bindmount.pp +++ b/manifests/functions/bindmount.pp @@ -1,18 +1,14 @@ -# Function: nfs::functions::bindmount -# -# @summary -# This Function exists to -# 1. manage bindmounts +# @summary Manage bindmounts. # # @param mount_name -# String. Sets the target directory for the bindmount +# Sets the target directory for the bindmount. # # @param ensure -# String. Sets if enabled or not. +# Sets if enabled or not. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::functions::bindmount ( Optional[String[1]] $mount_name = undef, diff --git a/manifests/functions/create_export.pp b/manifests/functions/create_export.pp index b610135..0678639 100644 --- a/manifests/functions/create_export.pp +++ b/manifests/functions/create_export.pp @@ -1,27 +1,23 @@ -# Function: nfs::functions::create_export -# -# @summary -# This Function exists to -# 1. manage export creation +# @summary Manage export creation. # # @param clients -# String or Array. Sets the clients allowed to mount the export with options. +# Sets the clients allowed to mount the export with options. # # @param ensure -# String. Sets if enabled or not. +# Sets if enabled or not. # # @param owner -# String. Sets the owner of the exported directory. +# Sets the owner of the exported directory. # # @param group -# String. Sets the group of the exported directory. +# Sets the group of the exported directory. # # @param mode -# String. Sets the permissions of the exported directory. +# Sets the permissions of the exported directory. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::functions::create_export ( Variant[String[1], Array[String[1]]] $clients, diff --git a/manifests/functions/mkdir.pp b/manifests/functions/mkdir.pp index 97dd0a8..b3565b3 100644 --- a/manifests/functions/mkdir.pp +++ b/manifests/functions/mkdir.pp @@ -1,14 +1,10 @@ -# Function: nfs::functions::mkdir -# -# @summary -# This Function exists to -# 1. manage dir creation +# @summary Manage directory creation. # # @param ensure # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::functions::mkdir ( String[1] $ensure = 'present', diff --git a/manifests/functions/nfsv4_bindmount.pp b/manifests/functions/nfsv4_bindmount.pp index 6435f28..1512637 100644 --- a/manifests/functions/nfsv4_bindmount.pp +++ b/manifests/functions/nfsv4_bindmount.pp @@ -1,21 +1,17 @@ -# Function: nfs::functions::nfsv4_bindmount -# -# @summary -# This Function exists to -# 1. manage bindmounts for nfs4 +# @summary Manage bindmounts for NFS v4. # # @param v4_export_name -# String. Sets the target directory for the bindmount +# Sets the target directory for the bindmount. # # @param bind -# String. Sets the bindmount options. +# Sets the bindmount options. # # @param ensure -# String. Sets if mounted or not. +# Sets if mounted or not. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::functions::nfsv4_bindmount ( String[1] $v4_export_name, diff --git a/manifests/init.pp b/manifests/init.pp index 0202db1..84238de 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,168 +1,199 @@ -# Class: nfs::init -# # @param ensure -# String. Controls if the managed resources shall be present or -# absent. If set to absent: +# 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, ...). +# * Any traces of the packages will be purged as good as possible. This may include existing configuration files. +# The exact behavior is provider dependent. +# * 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. +# # @param server_enabled -# Boolean. If set to true, this module will configure the node -# to act as a nfs server. +# If set to `true`, this module will configure the node to act as a NFS server. +# # @param client_enabled -# 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. +# 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. +# # @param storeconfigs_enabled -# Boolean. If set to false, this module will not export any -# resources as storeconfigs. Defaults to true. +# If set to `false`, this module will not export any resources as storeconfigs. +# # @param nfs_v4 -# Boolean. If set to true, this module will use nfs version 4 -# for exporting and mounting nfs resources. +# If set to `true`, this module will use NFS version 4 for exporting and mounting NFS resources. +# # @param nfs_v4_client -# 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 +# 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. +# # @param exports_file -# String. It defines the location of file with the nfs export resources used -# by the nfs server. +# It defines the location of file with the NFS export resources used by the NFS server. +# # @param idmapd_file -# String. It defines the location of the file with the idmapd settings. +# It defines the location of the file with the idmapd settings. +# # @param defaults_file -# String. It defines the location of the file with the nfs settings. +# It defines the location of the file with the NFS settings. +# # @param manage_packages -# Boolean. It defines if the packages should be managed through this module +# It defines if the packages should be managed through this module. +# # @param server_packages -# Array. It defines the packages needed to be installed for acting as -# a nfs server +# It defines the packages needed to be installed for acting as a NFS server. +# # @param server_package_ensure -# String. It defines the packages state - any of present, installed, -# absent, purged, held, latest +# It defines the packages state - any of `present`, `installed`, `absent`, `purged`, `held`, `latest`. +# # @param client_packages -# Array. It defines the packages needed to be installed for acting as -# a nfs client +# It defines the packages needed to be installed for acting as a NFS client +# # @param client_package_ensure -# String. It defines the packages state - any of present, installed, -# absent, purged, held, latest +# It defines the packages state - any of `present`, `installed`, `absent`, `purged`, `held`, `latest`. +# # @param manage_server_service -# Boolean. Defines if module should manage server_service +# Defines if module should manage server_service. +# # @param manage_server_servicehelper -# Boolean. Defines if module should manage server_servicehelper +# Defines if module should manage server_servicehelper. +# # @param manage_client_service -# Boolean. Defines if module should manage client_service +# Defines if module should manage client_service. +# # @param server_service_name -# String. It defines the servicename of the nfs server service +# It defines the servicename of the NFS server service. +# # @param server_service_ensure -# Boolean. It defines the service parameter ensure for nfs server services. +# It defines the service parameter ensure for NFS server services. +# # @param server_service_enable -# Boolean. It defines the service parameter enable for nfs server service. +# It defines the service parameter enable for NFS server service. +# # @param server_service_hasrestart -# Boolean. It defines the service parameter hasrestart for nfs server service. +# It defines the service parameter hasrestart for NFS server service. +# # @param server_service_hasstatus -# Boolean. It defines the service parameter hasstatus for nfs server service. +# It defines the service parameter hasstatus for NFS server service. +# # @param server_service_restart_cmd -# String. It defines the service parameter restart for nfs server service. +# It defines the service parameter restart for NFS server service. +# # @param server_nfsv4_servicehelper -# Array. It defines the service helper like idmapd for servers configured with -# nfs version 4. +# It defines the service helper like idmapd for servers configured with NFS version 4. +# # @param client_services -# Nested Hash. It defines the servicenames need to be started when acting as a nfs client +# It defines the servicenames need to be started when acting as a NFS client. +# # @param client_nfsv4_services -# Nested Hash. It defines the servicenames need to be started when acting as a nfs client -# version 4. +# It defines the servicenames need to be started when acting as a NFS client version 4. +# # @param client_services_enable -# Boolean. It defines the service parameter enable for nfs client services. +# It defines the service parameter enable for NFS client services. +# # @param client_idmapd_setting -# Array. It defines the Augeas parameter added in @param defaults_file when acting as a nfs -# version 4 client. +# It defines the Augeas parameter added in @param defaults_file when acting as a NFS version 4 client. +# # @param client_nfs_fstype -# String. It defines the name of the nfs filesystem, when adding entries to /etc/fstab -# on a client node. +# It defines the name of the NFS filesystem, when adding entries to `/etc/fstab` on a client node. +# # @param client_nfs_options -# String. It defines the options for the nfs filesystem, when adding entries to /etc/fstab -# on a client node. +# It defines the options for the NFS filesystem, when adding entries to `/etc/fstab` on a client node. +# # @param client_nfsv4_fstype -# String. It defines the name of the nfs version 4 filesystem, when adding entries -# to /etc/fstab on a client node. +# It defines the name of the NFS version 4 filesystem, when adding entries to `/etc/fstab` on a client node. +# # @param client_nfsv4_options -# String. It defines the options for the nfs version 4filesystem, when adding entries -# to /etc/fstab on a client node. +# It defines the options for the NFS version 4 filesystem, when adding entries to `/etc/fstab` on a client node. +# # @param nfs_v4_export_root -# String. It defines the location where nfs version 4 exports should be bindmounted to -# on a server node. Defaults to /export. +# It defines the location where NFS version 4 exports should be bindmounted to on a server node. +# # @param nfs_v4_export_root_clients -# 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). +# It defines the clients that are allowed to mount NFS version 4 exports and includes the option string. +# # @param nfs_v4_mount_root -# String. It defines the location where nfs version 4 clients find the mount root -# on a server node. Defaults to /srv. +# It defines the location where NFS version 4 clients find the mount root on a server node. +# # @param nfs_v4_idmap_domain -# 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. +# 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. +# # @param nfsv4_bindmount_enable -# Boolean. It defines if the module should create a bindmount for the export. -# Defaults to true. +# It defines if the module should create a bindmount for the export. +# # @param client_need_gssd -# Boolean. If true, sets NEED_GSSD=yes in /etc/defauls/nfs-common, usable on Debian/Ubuntu +# If `true`, sets `NEED_GSSD=yes` in `/etc/defauls/nfs-common`, usable on Debian/Ubuntu. +# # @param client_gssd_service -# Boolean. If true enable rpc-gssd service. +# If `true` enable rpc-gssd service. +# # @param client_gssd_options -# String. Options for rpc-gssd service. Defaults to '' +# Options for rpc-gssd service. +# # @param client_d9_gssdopt_workaround -# Boolean. If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9 +# If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9. +# # @param nfs_v4_idmap_localrealms -# String or Array. 'Local-Realms' option for idmapd. Defaults to '' +# `Local-Realms` option for idmapd. +# # @param nfs_v4_idmap_cache -# Integer. 'Cache-Expiration' option for idmapd. Defaults to 0 - unused. +# `Cache-Expiration` option for idmapd. If `0` cache is unused. +# # @param manage_nfs_v4_idmap_nobody_mapping -# Boolean. Enable setting Nobody mapping in idmapd. Defaults to false. +# Enable setting Nobody mapping in idmapd. +# # @param nfs_v4_idmap_nobody_user -# String. 'Nobody-User' option for idmapd. Defaults to nobody. +# `Nobody-User` option for idmapd. +# # @param nfs_v4_idmap_nobody_group -# String. 'Nobody-Group' option for idmapd. Defaults to nobody or nogroup. +# `Nobody-Group` option for idmapd. +# # @param client_rpcbind_config -# String. It defines the location of the file with the rpcbind config. +# It defines the location of the file with the rpcbind config. +# # @param client_rpcbind_optname -# String. It defines the name of env variable that holds the rpcbind config. E.g. OPTIONS for Debian +# It defines the name of environment variable that holds the rpcbind config. E.g. OPTIONS for Debian. +# # @param client_rpcbind_opts -# String. Options for rpcbind service. +# Options for rpcbind service. +# # @param nfs_v4_root_export_ensure -# String. It defines the state of the nfs version 4 root export. Defaults to mounted. +# It defines the state of the NFS version 4 root export. +# # @param nfs_v4_root_export_mount -# String. It defines the mountpoint of the nfs version 4 root export. Defaults to undef. +# It defines the mountpoint of the NFS version 4 root export. +# # @param nfs_v4_root_export_remounts -# Boolean. It defines if the nfs version 4 root export should be remounted. Defaults to false. +# It defines if the NFS version 4 root export should be remounted. +# # @param nfs_v4_root_export_atboot -# Boolean. It defines if the nfs version 4 root export should be mounted at boot. Defaults to false. +# It defines if the NFS version 4 root export should be mounted at boot. +# # @param nfs_v4_root_export_options -# String. It defines the options for the nfs version 4 root export. Defaults to _netdev. +# It defines the options for the NFS version 4 root export. +# # @param nfs_v4_root_export_bindmount -# String. It defines the bindmount of the nfs version 4 root export. Defaults to undef. +# It defines the bindmount of the NFS version 4 root export. +# # @param nfs_v4_root_export_tag -# String. It defines the tag of the nfs version 4 root export. Defaults to undef. +# It defines the tag of the NFS version 4 root export. +# # @param client_gssd_service_name -# Hash. It defines the servicename of the rpc-gssd service. +# It defines the servicename of the rpc-gssd service. +# # @param client_services_hasrestart -# Boolean. It defines the service parameter hasrestart for nfs client services. +# It defines the service parameter hasrestart for NFS client services. +# # @param client_services_hasstatus -# Boolean. It defines the service parameter hasstatus for nfs client services. +# 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. -# @example -# * {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] +# It defines the name of the gssd option in `/etc/default/nfs-common`. +# +# @see https://github.com/voxpupuli/puppet-nfs#examples Exemples # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs ( Enum['present', 'absent', 'running', 'stopped', 'disabled'] $ensure = 'present', diff --git a/manifests/params.pp b/manifests/params.pp index 7e0f092..0d01f4e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,16 +1,14 @@ -# Class: nfs::params +# @summary Manages defaults values for this module. # -# @summary # This class exists to -# 1. Declutter the default value assignment for class parameters. +# 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. +# Therefore, many operating system dependent differences (names, paths, ...) are addressed in here. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::params { #### Default values for the parameters of the main module class, init.pp diff --git a/manifests/server.pp b/manifests/server.pp index 7b33793..68abf53 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -1,7 +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 +# @summary Manage the NFS server. +# +# This class exists to: +# 1. Order the loading of classes, +# 2. Including all needed classes for NFS as a server. # # @param ensure # @param nfs_v4 @@ -17,8 +18,8 @@ # @param nfs_v4_root_export_tag # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::server ( Enum['present', 'absent', 'running', 'stopped', 'disabled'] $ensure = $nfs::ensure, diff --git a/manifests/server/config.pp b/manifests/server/config.pp index 989958a..412676d 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -1,12 +1,8 @@ -# Class: nfs::server::config -# -# @summary -# This class exists to -# 1. configure nfs as a server +# @summary Configure NFS as a server. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::server::config { concat { $nfs::exports_file: diff --git a/manifests/server/export.pp b/manifests/server/export.pp index 3b5a26b..2630324 100644 --- a/manifests/server/export.pp +++ b/manifests/server/export.pp @@ -1,85 +1,68 @@ -# Function: nfs::server::export -# -# @summary -# This Function exists to -# 1. manage all exported resources on a nfs server -# -# Parameters +# @summary Manage all exported resources on a NFS server. # # @param clients -# String or Array. Sets the allowed clients and options for the export in the exports file. -# Defaults to localhost(ro) +# Sets the allowed clients and options for the export in the exports file. # # @param bind -# String. Sets the bind options setted in /etc/fstab for the bindmounts created. -# Defaults to rbind +# Sets the bind options setted in `/etc/fstab` for the bindmounts created. # # @param ensure -# String. If enabled the mount will be created. Defaults to mounted +# If enabled the mount will be created. # # @param remounts -# String. Sets the remounts parameter of the mount. +# Sets the remounts parameter of the mount. # # @param atboot -# String. Sets the atboot parameter of the mount. +# Sets the atboot parameter of the mount. # # @param options_nfsv4 -# String. Sets the mount options for a nfs version 4 exported resource mount. +# Sets the mount options for a NFS version 4 exported resource mount. # # @param options_nfs -# String. Sets the mount options for a nfs exported resource mount. +# Sets the mount options for a NFS exported resource mount. # # @param bindmount -# String. When not undef it will create a bindmount on the node -# for the nfs mount. +# When not undef it will create a bindmount on the node for the NFS mount. # # @param nfstag -# String. Sets the nfstag parameter of the mount. +# Sets the nfstag parameter of the mount. # # @param mount -# 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 +# Sets the mountpoint the client will mount the exported resource mount on. If undef it defaults to the same path as +# on the server. # # @param owner -# String. Sets the owner of the exported directory +# Sets the owner of the exported directory. # # @param group -# String. Sets the group of the exported directory +# Sets the group of the exported directory. # # @param mode -# String. Sets the permissions of the exported directory. +# Sets the permissions of the exported directory. # # @param server -# String. Sets the hostname clients will use to mount the exported resource. If undef it -# defaults to the trusted certname +# Sets the hostname clients will use to mount the exported resource. If undef it defaults to the trusted certname. # # @param v3_export_name # @param v4_export_name # @param nfsv4_bindmount_enable # -# @examples -# -# 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] +# @example +# 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', +# } # # @author -# -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # define nfs::server::export ( String[1] $v3_export_name = $name, diff --git a/manifests/server/package.pp b/manifests/server/package.pp index 3ee9128..cafb6d3 100644 --- a/manifests/server/package.pp +++ b/manifests/server/package.pp @@ -1,12 +1,8 @@ -# Class: nfs::server::package -# -# @summary -# This Function exists to -# 1. install needed packages for nfs server +# @summary Install needed packages for NFS server. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::server::package { if $nfs::manage_packages { diff --git a/manifests/server/service.pp b/manifests/server/service.pp index 7360d76..b062786 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -1,12 +1,8 @@ -# Class: nfs::server::service -# -# @summary -# This Function exists to -# 1. manage the needed services for nfs server +# @summary Manage the needed services for NFS server. # # @author -# * Daniel Klockenkaemper -# * Martin Alfke +# * Daniel Klockenkaemper +# * Martin Alfke # class nfs::server::service { if $nfs::nfs_v4 == true {