nfs
: Class: nfs::init * {Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples] * Daniel Klockenkaemper <mailto:dk@marketing-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 Klocnfs::client::config
: Class: nfs::client::config This Function exists to 1. configure nfs as a client * Daniel Klockenkaemper mailto:[email protected] *nfs::client::package
: Class: nfs::client::package This Function exists to 1. install needed packages for nfs clients * Daniel Klockenkaemper <mailto:dk@marketinnfs::client::service
: Class: nfs::client::service This Function exists to 1. manage the needed services for nfs clients * Daniel Klockenkaemper <mailto:dk@markenfs::params
: Class: nfs::params This class exists to 1. Declutter the default value assignment for class parameters. 2. Manage internally used module varnfs::server
: Class: nfs::servernfs::server::config
: Class: nfs::server::config This class exists to 1. configure nfs as a server * Daniel Klockenkaemper mailto:[email protected] * Manfs::server::package
: Class: nfs::server::package This Function exists to 1. install needed packages for nfs server * Daniel Klockenkaemper <mailto:dk@marketingnfs::server::service
: Class: nfs::server::service This Function exists to 1. manage the needed services for nfs server * Daniel Klockenkaemper <mailto:dk@market
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 tonfs::functions::bindmount
: Function: nfs::functions::bindmount This Function exists to 1. manage bindmounts * Daniel Klockenkaemper mailto:[email protected]nfs::functions::create_export
: Function: nfs::functions::create_export This Function exists to 1. manage export creation * Daniel Klockenkaemper <mailto:dk@marketing-facnfs::functions::mkdir
: Function: nfs::functions::mkdir This Function exists to 1. manage dir creation * Daniel Klockenkaemper mailto:[email protected] *nfs::functions::nfsv4_bindmount
: Function: nfs::functions::nfsv4_bindmount This Function exists to 1. manage bindmounts for nfs4 * Daniel Klockenkaemper <mailto:dk@marketinfs::server::export
: Function: nfs::server::export This Function exists to 1. manage all exported resources on a nfs server Parameters class { '::nfs': serv
Class: nfs::init
-
{Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples]
-
Daniel Klockenkaemper mailto:[email protected]
-
Martin Alfke [email protected]
The following parameters are available in the nfs
class:
ensure
server_enabled
client_enabled
storeconfigs_enabled
nfs_v4
nfs_v4_client
exports_file
idmapd_file
defaults_file
manage_packages
server_packages
server_package_ensure
client_packages
client_package_ensure
manage_server_service
manage_server_servicehelper
manage_client_service
server_service_name
server_service_ensure
server_service_enable
server_service_hasrestart
server_service_hasstatus
server_service_restart_cmd
server_nfsv4_servicehelper
client_services
client_nfsv4_services
client_services_enable
client_idmapd_setting
client_nfs_fstype
client_nfs_options
client_nfsv4_fstype
client_nfsv4_options
nfs_v4_export_root
nfs_v4_export_root_clients
nfs_v4_mount_root
nfs_v4_idmap_domain
nfsv4_bindmount_enable
client_need_gssd
client_gssd_service
client_gssd_options
client_d9_gssdopt_workaround
nfs_v4_idmap_localrealms
nfs_v4_idmap_cache
manage_nfs_v4_idmap_nobody_mapping
nfs_v4_idmap_nobody_user
nfs_v4_idmap_nobody_group
client_rpcbind_config
client_rpcbind_optname
client_rpcbind_opts
nfs_v4_root_export_ensure
nfs_v4_root_export_mount
nfs_v4_root_export_remounts
nfs_v4_root_export_atboot
nfs_v4_root_export_options
nfs_v4_root_export_bindmount
nfs_v4_root_export_tag
client_gssd_service_name
client_services_hasrestart
client_services_hasstatus
client_gssdopt_name
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'
Data type: Boolean
Boolean. If set to true, this module will configure the node to act as a nfs server.
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.
Default value: false
Data type: Boolean
Boolean. If set to false, this module will not export any resources as storeconfigs. Defaults to true.
Default value: true
Data type: Boolean
Boolean. If set to true, this module will use nfs version 4 for exporting and mounting nfs resources.
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
Default value: false
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
Data type: Stdlib::Absolutepath
String. It defines the location of the file with the idmapd settings.
Default value: $nfs::params::idmapd_file
Data type: Optional[Stdlib::Absolutepath]
String. It defines the location of the file with the nfs settings.
Default value: $nfs::params::defaults_file
Data type: Boolean
Boolean. It defines if the packages should be managed through this module
Default value: true
Data type: Array
Array. It defines the packages needed to be installed for acting as a nfs server
Default value: $nfs::params::server_packages
Data type: String
String. It defines the packages state - any of present, installed, absent, purged, held, latest
Default value: 'installed'
Data type: Array
Array. It defines the packages needed to be installed for acting as a nfs client
Default value: $nfs::params::client_packages
Data type: String
String. It defines the packages state - any of present, installed, absent, purged, held, latest
Default value: 'installed'
Data type: Boolean
Boolean. Defines if module should manage server_service
Default value: true
Data type: Boolean
Boolean. Defines if module should manage server_servicehelper
Default value: true
Data type: Boolean
Boolean. Defines if module should manage client_service
Default value: true
Data type: String
String. It defines the servicename of the nfs server service
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.
Default value: 'running'
Data type: Boolean
Boolean. It defines the service parameter enable for nfs server service.
Default value: true
Data type: Boolean
Boolean. It defines the service parameter hasrestart for nfs server service.
Default value: $nfs::params::server_service_hasrestart
Data type: Boolean
Boolean. It defines the service parameter hasstatus for nfs server service.
Default value: $nfs::params::server_service_hasstatus
Data type: Optional[String]
String. It defines the service parameter restart for nfs server service.
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.
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
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.
Default value: $nfs::params::client_nfsv4_services
Data type: Boolean
Boolean. It defines the service parameter enable for nfs client services.
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.
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.
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.
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.
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.
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.
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).
Default value: "*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"
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: '/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.
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.
Default value: true
Data type: Boolean
Boolean. If true, sets NEED_GSSD=yes in /etc/defauls/nfs-common, usable on Debian/Ubuntu
Default value: false
Data type: Boolean
Boolean. If true enable rpc-gssd service.
Default value: false
Data type: String
String. Options for rpc-gssd service. Defaults to ''
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
Default value: false
Data type: Variant[String, Array]
String or Array. 'Local-Realms' option for idmapd. Defaults to ''
Default value: ''
Data type: Integer
Integer. 'Cache-Expiration' option for idmapd. Defaults to 0 - unused.
Default value: 0
Data type: Boolean
Boolean. Enable setting Nobody mapping in idmapd. Defaults to false.
Default value: false
Data type: String
String. 'Nobody-User' option for idmapd. Defaults to nobody.
Default value: $nfs::params::nfs_v4_idmap_nobody_user
Data type: String
String. 'Nobody-Group' option for idmapd. Defaults to nobody or nogroup.
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.
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
Default value: $nfs::params::client_rpcbind_optname
Data type: Optional[String]
String. Options for rpcbind service.
Default value: undef
Data type: String
String. It defines the state of the nfs version 4 root export. Defaults to mounted.
Default value: 'mounted'
Data type: Optional[String]
String. It defines the mountpoint of the nfs version 4 root export. Defaults to undef.
Default value: undef
Data type: Boolean
Boolean. It defines if the nfs version 4 root export should be remounted. Defaults to false.
Default value: false
Data type: Boolean
Boolean. It defines if the nfs version 4 root export should be mounted at boot. Defaults to false.
Default value: false
Data type: String
String. It defines the options for the nfs version 4 root export. Defaults to _netdev.
Default value: '_netdev'
Data type: Optional[String]
String. It defines the bindmount of the nfs version 4 root export. Defaults to undef.
Default value: undef
Data type: Optional[String]
String. It defines the tag of the nfs version 4 root export. Defaults to undef.
Default value: undef
Data type: Optional[Hash]
Hash. It defines the servicename of the rpc-gssd service.
Default value: $nfs::params::client_gssd_service_name
Data type: Boolean
Boolean. It defines the service parameter hasrestart for nfs client services.
Default value: $nfs::params::client_services_hasrestart
Data type: Boolean
Boolean. It defines the service parameter hasstatus for nfs client services.
Default value: $nfs::params::client_services_hasstatus
Data type: String
String. It defines the name of the gssd option in /etc/default/nfs-common.
Default value: $nfs::params::client_gssdopt_name
Class: nfs::client
This class exists to
- order the loading of classes
- including all needed classes for nfs as a client
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
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'.
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'.
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'.
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'.
Default value: $nfs::nfs_v4_idmap_domain
Class: nfs::client::config This Function exists to
- configure nfs as a client
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Class: nfs::client::package
This Function exists to
- install needed packages for nfs clients
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Class: nfs::client::service
This Function exists to
- manage the needed services for nfs clients
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Class: nfs::params
This class exists to
- Declutter the default value assignment for class parameters.
- Manage internally used module variables in a central place.
Therefore, many operating system dependent differences (names, paths, ...) are addressed in here.
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
This class exists to
- order the loading of classes
- including all needed classes for nfs as a server
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke mailto:[email protected]
The following parameters are available in the nfs::server
class:
ensure
nfs_v4
nfs_v4_export_root
nfs_v4_export_root_clients
nfs_v4_idmap_domain
nfs_v4_root_export_ensure
nfs_v4_root_export_mount
nfs_v4_root_export_remounts
nfs_v4_root_export_atboot
nfs_v4_root_export_options
nfs_v4_root_export_bindmount
nfs_v4_root_export_tag
Data type: Enum['present', 'absent', 'running', 'stopped', 'disabled']
Default value: $nfs::ensure
Data type: Boolean
Default value: $nfs::nfs_v4
Data type: String
Default value: $nfs::nfs_v4_export_root
Data type: String
Default value: $nfs::nfs_v4_export_root_clients
Data type: String
Default value: $nfs::nfs_v4_idmap_domain
Data type: String
Default value: $nfs::nfs_v4_root_export_ensure
Data type: Optional[String]
Default value: $nfs::nfs_v4_root_export_mount
Data type: Boolean
Default value: $nfs::nfs_v4_root_export_remounts
Data type: Boolean
Default value: $nfs::nfs_v4_root_export_atboot
Data type: String
Default value: $nfs::nfs_v4_root_export_options
Data type: Optional[String]
Default value: $nfs::nfs_v4_root_export_bindmount
Data type: Optional[String]
Default value: $nfs::nfs_v4_root_export_tag
Class: nfs::server::config
This class exists to
- configure nfs as a server
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Class: nfs::server::package
This Function exists to
- install needed packages for nfs server
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Class: nfs::server::service
This Function exists to
- manage the needed services for nfs server
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
Function: nfs::client::mount
This Function exists to
- 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 mailto:[email protected]
- Martin Alfke [email protected]
The following parameters are available in the nfs::client::mount
defined type:
server
share
ensure
remounts
atboot
options_nfsv4
options_nfs
bindmount
nfstag
owner
group
mode
mount_root
mount
manage_packages
client_packages
nfs_v4
Data type: String[1]
String. Sets the ip address of the server with the nfs export
Data type: Optional[String[1]]
String. Sets the name of the nfs share on the server
Default value: undef
Data type: String[1]
String. Sets the ensure parameter of the mount.
Default value: 'mounted'
Data type: Boolean
String. Sets the remounts parameter of the mount.
Default value: false
Data type: Boolean
String. Sets the atboot parameter of the mount.
Default value: false
Data type: String[1]
String. Sets the mount options for a nfs version 4 mount.
Default value: $nfs::client_nfsv4_options
Data type: String[1]
String. Sets the mount options for a nfs mount.
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.
Default value: undef
Data type: Optional[String[1]]
String. Sets the nfstag parameter of the mount.
Default value: undef
Data type: Optional[String[1]]
String. Set owner of mount dir
Default value: undef
Data type: Optional[String[1]]
String. Set group of mount dir
Default value: undef
Data type: Optional[String[1]]
String. Set mode of mount dir
Default value: undef
Data type: Optional[String[1]]
String. Overwrite mount root if differs from server config
Default value: undef
Data type: String[1]
Default value: $title
Data type: Boolean
Default value: $nfs::manage_packages
Data type: Optional[Variant[String[1], Array[String[1]]]]
Default value: $nfs::effective_client_packages
Data type: Boolean
Default value: $nfs::client::nfs_v4
Function: nfs::functions::bindmount
This Function exists to
- manage bindmounts
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
The following parameters are available in the nfs::functions::bindmount
defined type:
Data type: Optional[String[1]]
String. Sets the target directory for the bindmount
Default value: undef
Data type: String[1]
String. Sets if enabled or not.
Default value: 'present'
Function: nfs::functions::create_export
This Function exists to
- manage export creation
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
The following parameters are available in the nfs::functions::create_export
defined type:
Data type: Variant[String[1], Array[String[1]]]
String or Array. Sets the clients allowed to mount the export with options.
Data type: String[1]
String. Sets if enabled or not.
Default value: 'present'
Data type: Optional[String[1]]
String. Sets the owner of the exported directory.
Default value: undef
Data type: Optional[String[1]]
String. Sets the group of the exported directory.
Default value: undef
Data type: Optional[String[1]]
String. Sets the permissions of the exported directory.
Default value: undef
Function: nfs::functions::mkdir
This Function exists to
- manage dir creation
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
The following parameters are available in the nfs::functions::mkdir
defined type:
Data type: String[1]
Default value: 'present'
Function: nfs::functions::nfsv4_bindmount
This Function exists to
- manage bindmounts for nfs4
- Daniel Klockenkaemper mailto:[email protected]
- Martin Alfke [email protected]
The following parameters are available in the nfs::functions::nfsv4_bindmount
defined type:
Data type: String[1]
String. Sets the target directory for the bindmount
Data type: String[1]
String. Sets the bindmount options.
Data type: String[1]
String. Sets if mounted or not.
Default value: 'mounted'
Function: nfs::server::export
This Function exists to
- 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 mailto:[email protected]
-
Martin Alfke mailto:[email protected]
The following parameters are available in the nfs::server::export
defined type:
clients
bind
ensure
remounts
atboot
options_nfsv4
options_nfs
bindmount
nfstag
mount
owner
group
mode
server
v3_export_name
v4_export_name
nfsv4_bindmount_enable
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)'
Data type: String[1]
String. Sets the bind options setted in /etc/fstab for the bindmounts created. Defaults to rbind
Default value: 'rbind'
Data type: String[1]
String. If enabled the mount will be created. Defaults to mounted
Default value: 'mounted'
Data type: Boolean
String. Sets the remounts parameter of the mount.
Default value: false
Data type: Boolean
String. Sets the atboot parameter of the mount.
Default value: false
Data type: String[1]
String. Sets the mount options for a nfs version 4 exported resource mount.
Default value: $nfs::client_nfsv4_options
Data type: String[1]
String. Sets the mount options for a nfs exported resource mount.
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.
Default value: undef
Data type: Optional[String[1]]
String. Sets the nfstag parameter of the mount.
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
Default value: undef
Data type: Optional[String[1]]
String. Sets the owner of the exported directory
Default value: undef
Data type: Optional[String[1]]
String. Sets the group of the exported directory
Default value: undef
Data type: Optional[String[1]]
String. Sets the permissions of the exported directory.
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
Default value: $facts['clientcert']
Data type: String[1]
Default value: $name
Data type: String[1]
Default value: regsubst($name, '.*/(.*)', '\1' )
Data type: Boolean
Default value: $nfs::nfsv4_bindmount_enable