Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-nfs', '3.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-nfs
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with puppet-nfs
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Module Description
This module installs, configures and manages everything on NFS clients and servers.
This module is a complete refactor of the module haraldsk/nfs, because Harald Skoglund sadly is not maintaining his module actively anymore. It is stripped down to use only the class 'nfs' and parametrized to act as a server, client or both with the parameters 'server_enabled' and 'client_enabled'. It also has some dependencies on newer stdlib functions like 'difference'.
It supports the OS Families Ubuntu, Debian, Redhat, SUSE, Gentoo and Archlinux. It supports also Strict Variables, so if you pass all OS specific parameters correctly it should work on your preferred OS too. Feedback, bugreports, and feature requests are always welcome, visit https://github.com/voxpupuli/puppet-nfs or send me an email.
When you are using a puppet version 3.x like it is shipped with Redhat Satellite 6, please use a version 1.x.x from puppet forge or the branch puppet3 when cloning directly from Github. (Note: https://github.com/voxpupuli/puppet-nfs/pull/49#issuecomment-285091678). I'll recommend using puppet >= 4.6.1, puppet versions up until 4.6.0 had various issues.
If you want to contribute, please do a fork on github, create a branch "feature name" with your features and do a pull request.
Warning: I've introduced new dependencies with version 2.1.0 which were needed to fix buggy rpcbind-socket restarting with systemd:
- puppetlabs/transition
- herculesteam/augeasproviders_core
- herculesteam/augeasproviders_shellvar
Setup
What puppet-nfs affects
This module can be used to configure your nfs client and/or server, it could export nfs mount resources via storeconfigs or simply mount nfs shares on a client. You can also easily use the create_resources function when you store your exports i.e. via hiera.
Setup requirements
This Module depends on puppetlabs-stdlib >= 4.5.0 and puppetlabs-concat >= 1.1.2, you need to have these modules installed to use puppet-nfs module.
Beginning with puppet-nfs
On a nfs server the following code is sufficient to get all packages installed and services running to use nfs:
node server {
class { '::nfs':
server_enabled => true,
}
}
On a client the following code is sufficient:
node server {
class { '::nfs':
client_enabled => true,
}
}
Usage
Simple NFSv3 server and client example
This will export /data_folder on the server and automagically mount it on client.
node server {
class { '::nfs':
server_enabled => true
}
nfs::server::export{ '/data_folder':
ensure => 'mounted',
clients => '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)'
}
}
# By default, mounts are mounted in the same folder on the clients as
# they were exported from on the server
node client {
class { '::nfs':
client_enabled => true,
}
Nfs::Client::Mount <<| |>>
}
Simple NFSv4 client example
This will mount /data on client in /share/data.
node client {
class { '::nfs':
server_enabled => false,
client_enabled => true,
nfs_v4_client => true,
nfs_v4_idmap_domain => $::domain,
}
nfs::client::mount { '/share/data':
server => '192.168.0.1',
share => 'data',
}
}
NFSv3 multiple exports, servers and multiple node example
node server1 {
class { '::nfs':
server_enabled => true,
}
nfs::server::export { '/data_folder':
ensure => 'mounted',
clients => '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)',
}
nfs::server::export { '/homeexport':
ensure => 'mounted',
clients => '10.0.0.0/24(rw,insecure,async,root_squash)',
mount => '/srv/home',
}
}
node server2 {
class { '::nfs':
server_enabled => true,
}
# ensure is passed to mount, which will make the client not mount it
# the directory automatically, just add it to fstab
nfs::server::export { '/media_library':
ensure => 'present',
nfstag => 'media',
clients => '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)',
}
}
node client {
class { '::nfs':
client_enabled => true,
}
Nfs::Client::Mount <<| |>>
}
# Using a storeconfig override, to change ensure option, so we mount
# all shares
node greedy_client {
class { '::nfs':
client_enabled => true,
}
Nfs::Client::Mount <<| |>> {
ensure => 'mounted',
}
}
# only the mount tagged as media
# also override mount point
node media_client {
class { '::nfs':
client_enabled => true,
}
Nfs::Client::Mount <<| nfstag == 'media' |>> {
ensure => 'mounted',
mount => '/import/media',
}
}
# All @@nfs::server::mount storeconfigs can be filtered by parameters
# Also all parameters can be overridden (not that it's smart to do
# so).
# Check out the doc on exported resources for more info:
# http://docs.puppetlabs.com/guides/exported_resources.html
node single_server_client {
class { '::nfs':
client_enabled => true,
}
Nfs::Client::Mount <<| server == 'server1' |>> {
ensure => 'absent',
}
}
NFSv4 Simple example
# We use the $::domain fact for the Domain setting in
# /etc/idmapd.conf.
# For NFSv4 to work this has to be equal on servers and clients
# set it manually if unsure.
#
# All nfsv4 exports are bind mounted into /export/$mount_name
# and mounted on /srv/$mount_name on the client.
# Both values can be overridden through parameters both globally
# and on individual nodes.
node server {
file { ['/data_folder', '/homeexport']:
ensure => 'directory',
}
class { '::nfs':
server_enabled => true,
nfs_v4 => true,
nfs_v4_idmap_domain => 'example.com',
nfs_v4_export_root => '/export',
nfs_v4_export_root_clients => '*(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)',
}
nfs::server::export { '/data_folder':
ensure => 'mounted',
clients => '*(rw,insecure,async,no_root_squash,no_subtree_check)',
}
nfs::server::export { '/homeexport':
ensure => 'mounted',
clients => '*(rw,insecure,async,root_squash,no_subtree_check)',
mount => '/srv/home',
}
}
# By default, mounts are mounted in the same folder on the clients as
# they were exported from on the server
node client {
class { '::nfs':
client_enabled => true,
nfs_v4_client => true,
}
Nfs::Client::Mount <<| |>>
}
# We can also mount the NFSv4 Root directly through nfs::client::mount::nfsv4::root.
# By default /srv will be used for as mount point, but can be overriden through
# the 'mounted' option.
node client2 {
$server = 'server'
class { '::nfs':
client_enabled => true,
nfs_v4_client => true,
}
Nfs::Client::Mount::Nfs_v4::Root <<| server == $server |>> {
mount => "/srv/${server}",
}
}
NFSv4 insanely overcomplicated reference example
# and on individual nodes.
node server {
class { '::nfs':
server_enabled => true,
nfs_v4 => true,
# Below are defaults
nfs_v4_idmap_domain => $::domain,
nfs_v4_export_root => '/export',
# Default access settings of /export root
nfs_v4_export_root_clients =>
"*.${::domain}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)",
}
nfs::server::export { '/data_folder':
# These are the defaults
ensure => 'mounted',
# rbind or bind mounting of folders bindmounted into /export
# google it
bind => 'rbind',
# everything below here is propogated by to storeconfigs
# to clients
#
# Directory where we want export mounted on client
mount => undef,
remounts => false,
atboot => false,
# Don't remove that option, but feel free to add more.
options_nfs => '_netdev',
# If set will mount share inside /srv (or overridden mount_root)
# and then bindmount to another directory elsewhere in the fs -
# for fanatics.
bindmount => undef,
# Used to identify a catalog item for filtering by by
# storeconfigs, kick ass.
nfstag => 'kick-ass',
# copied directly into /etc/exports as a string, for simplicity
clients => '10.0.0.0/24(rw,insecure,no_subtree_check,async,no_root_squash)',
}
}
node client {
class { '::nfs':
client_enabled => true,
nfs_v4_client => true,
nfs_v4_idmap_domain => $::domain,
nfs_v4_mount_root => '/srv',
}
# We can as you by now know, override options set on the server
# on the client node.
# Be careful. Don't override mount points unless you are sure
# that only one export will match your filter!
Nfs::Client::Mount <<| nfstag == 'kick-ass' |>> {
# Directory where we want export mounted on client
mount => undef,
remounts => false,
atboot => false,
# Don't remove that option, but feel free to add more.
options_nfs => '_netdev',
# If set will mount share inside /srv (or overridden mount_root)
# and then bindmount to another directory elsewhere in the fs -
# for fanatics.
bindmount => undef,
}
}
Simple create nfs export resources with hiera example
Hiera Server Role:
classes:
- nfs
nfs::server_enabled: true
nfs::client_enabled: false
nfs::nfs_v4: true
nfs::nfs_v4_idmap_domain: %{::domain}
nfs::nfs_v4_export_root: '/share'
nfs::nfs_v4_export_root_clients: '192.168.0.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)'
nfs::nfs_exports_global:
/var/www: {}
/var/smb: {}
Hiera Client Role:
classes:
- nfs
nfs::client_enabled: true
nfs::nfs_v4_client: true
nfs::nfs_v4_idmap_domain: %{::domain}
nfs::nfs_v4_mount_root: '/share'
nfs::nfs_server: 'nfs-server-fqdn'
Puppet:
node server {
hiera_include('classes')
$nfs_exports_global = hiera_hash('nfs::nfs_exports_global', false)
$defaults_nfs_exports = {
ensure => 'mounted',
clients => '192.168.0.0/24(rw,insecure,no_subtree_check,async,no_root_squash)',
nfstag => $::fqdn,
}
if $nfs_exports_global {
create_resources('::nfs::server::export', $nfs_exports_global, $defaults_nfs_exports)
}
}
node client {
hiera_include('classes')
$nfs_server = hiera('nfs::nfs_server', false)
if $nfs_server {
Nfs::Client::Mount <<| nfstag == $nfs_server |>>
}
}
Reference
Classes
Public Classes
nfs
: Main class, includes all other classes
Public Defines
nfs::client::mount
: Handles all mounts on a nfs client.nfs::server::export
: Handles all nfs exports on a nfs server.
Private Classes
-
nfs::client
: Includes all relevant classes for configuring as a client. -
nfs::client::config
: Handles the configuration files. -
nfs::client::package
: Handles the packages. -
nfs::client::service
: Handles the services. -
nfs::server
: Includes all relevant classes for configuring as a server. -
nfs::server::config
: Handles the configuration files. -
nfs::server::package
: Handles the packages. -
nfs::server::service
: Handles the services. -
nfs::params
: Includes all os specific parameters.
Private Defines
nfs::bindmount
: Creates the bindmounts of nfs 3 exports.nfs::nfsv4_bindmount
: Creates the bindmounts of nfs 4 exports.nfs::create_export
: Creates the nfs exports.nfs::mkdir
: Creates directories recursive.
Parameters
Class: ::nfs
The following parameters are available in the ::nfs
class:
ensure
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.
server_enabled
Boolean. If set to true, this module will configure the node to act as a nfs server.
client_enabled
Boolean. If set to true, this module will configure the node to act as a nfs client, you can use the exported mount resources from configured servers.
storeconfigs_enabled
Boolean. If set to false, this module will not export any resources as storeconfigs. Defaults to true.
nfs_v4
Boolean. If set to true, this module will use nfs version 4 for exporting and mounting nfs resources. It defaults to true.
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 true.
exports_file
String. It defines the location of the file with the nfs export resources used by the nfs server.
idmapd_file
String. It defines the location of the file with the idmapd settings.
defaults_file
String. It defines the location of the file with the nfs settings.
manage_packages
Boolean. It defines if the packages should be managed through this module
server_packages
Array. It defines the packages needed to be installed for acting as a nfs server
server_package_ensure
String. It defines the packages state - any of present, installed, absent, purged, held, latest
client_packages
Array. It defines the packages needed to be installed for acting as a nfs client
client_package_ensure
String. It defines the packages state - any of present, installed, absent, purged, held, latest
manage_server_service
Boolean. Defines if module should manage server_service
manage_server_servicehelper
Boolean. Defines if module should manage server_servicehelper
manage_client_service
Boolean. Defines if module should manage client_service
server_service_name
String. It defines the servicename of the nfs server service
server_service_ensure
Boolean. It defines the service parameter ensure for nfs server services.
server_service_enable
Boolean. It defines the service parameter enable for nfs server service.
server_service_hasrestart
Boolean. It defines the service parameter hasrestart for nfs server service.
server_service_hasstatus
Boolean. It defines the service parameter hasstatus for nfs server service.
server_service_restart_cmd
String. It defines the service parameter restart for nfs server service.
server_nfsv4_servicehelper
Array. It defines the service helper like idmapd for servers configured with nfs version 4.
client_services
Nested Hash. It defines the servicenames need to be started when acting as a nfs client
client_nfsv4_services
Nested Hash. It defines the servicenames need to be started when acting as a nfs client version 4.
client_service_hasrestart
Boolean. It defines the service parameter hasrestart for nfs client services.
client_service_hasstatus
Boolean. It defines the service parameter hasstatus for nfs client services.
client_idmapd_setting
Array. It defines the Augeas parameter added in defaults_file
when acting as a nfs
version 4 client.
client_nfs_fstype
String. It defines the name of the nfs filesystem, when adding entries to /etc/fstab on a client node.
client_nfs_options
String. It defines the options for the nfs filesystem, when adding entries to /etc/fstab on a client node.
client_nfsv4_fstype
String. It defines the name of the nfs version 4 filesystem, when adding entries to /etc/fstab on a client node.
client_nfsv4_options
String. It defines the options for the nfs version 4filesystem, when adding entries to /etc/fstab on a client node.
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.
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).
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.
nfs_v4_idmap_domain
String. It defines the name of the idmapd domain setting in 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.
nfsv4_bindmount_enable
Boolean. It defines if the module should create a bindmount for the export. Defaults to true.
client_need_gssd
Boolean. If true, sets NEED_GSSD=yes in /etc/defauls/nfs-common, usable on Debian/Ubuntu
client_gssd_service
Boolean. If true enable rpc-gssd service.
client_gssd_options
String. Options for rpc-gssd service. Defaults to ''
client_d9_gssdopt_workaround
Boolean. If enabled, workaround for passing gssd_options which is broken on Debian 9. Usable only on Debian 9
nfs_v4_idmap_localrealms
String or Array. 'Local-Realms' option for idmapd. Defaults to ''
nfs_v4_idmap_cache
Integer. 'Cache-Expiration' option for idmapd. Defaults to 0 - unused.
manage_nfs_v4_idmap_nobody_mapping
Boolean. Enable setting Nobody mapping in idmapd. Defaults to false.
nfs_v4_idmap_nobody_user
String. 'Nobody-User' option for idmapd. Defaults to nobody.
nfs_v4_idmap_nobody_group
String. 'Nobody-Group' option for idmapd. Defaults to nobody or nogroup.
client_rpcbind_config
String. It defines the location of the file with the rpcbind config.
client_rpcbind_optname
String. It defines the name of env variable that holds the rpcbind config. E.g. OPTIONS for Debian
client_rpcbind_opts
String. Options for rpcbind service.
Define: ::nfs::client::mount
The following parameters are available in the ::nfs::client::mount
define:
server
String. Sets the ip address of the server with the nfs export
share
String. Sets the name of the nfs share on the server
ensure
String. Sets the ensure parameter of the mount.
remounts
String. Sets the remounts parameter of the mount.
atboot
String. Sets the atboot parameter of the mount.
options_nfsv4
String. Sets the mount options for a nfs version 4 mount.
options_nfs
String. Sets the mount options for a nfs mount.
bindmount
String. When not undef it will create a bindmount on the node for the nfs mount.
nfstag
String. Sets the nfstag parameter of the mount.
nfs_v4
Boolean. When set to true, it uses nfs version 4 to mount a share.
owner
String. Set owner of mount dir
group
String. Set group of mount dir
mode
String. Set mode of mount dir
mount_root
String. Overwrite mount root if differs from server config
Define: ::nfs::server::export
The following parameters are available in the ::nfs::server::export
define:
clients
String. Sets the allowed clients and options for the export in the exports file. Defaults to localhost(ro)
bind
String. Sets the bind options setted in /etc/fstab for the bindmounts created.
Defaults to rbind. When you have any submounts in your exported folders,
the rbind option will submount them in the bindmount folder. You have to set the
crossmnt
option in your nfs export to have the submounts from rbind available
on your client. Your export should look like this:
node client {
nfs::server::export { '/home':
ensure => 'mounted',
clients => '*(rw,insecure,no_subtree_check,async,no_root_squash,crossmnt)',
}
}
ensure
String. If enabled the mount will be created. Defaults to mounted
remounts
String. Sets the remounts parameter of the mount.
atboot
String. Sets the atboot parameter of the mount.
options_nfsv4
String. Sets the mount options for a nfs version 4 exported resource mount.
options_nfs
String. Sets the mount options for a nfs exported resource mount.
bindmount
String. When not undef it will create a bindmount on the node for the nfs mount.
nfstag
String. Sets the nfstag parameter of the mount.
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
owner
String. Sets the owner of the exported directory
group
String. Sets the group of the exported directory
mode
String. Sets the permissions of the exported directory.
Requirements
Modules needed:
puppetlabs/stdlib >= 4.5.0 puppetlabs/concat >= 1.1.2
Software versions needed:
facter > 1.6.2 puppet > 3.2.0
Ruby Gems needed:
augeas
Limitations
If you want to have specific package versions installed you may manage the needed packages outside of this module (use manage_packages => false). It is only tested to use 'present', 'installed', 'absent', 'purged', 'held' and 'latest' as argument for the parameters server_package_ensure and client_package_ensure.
Development
Derdanne modules are open projects. So if you want to make this module even better, you can contribute to this module on Github.
Before pushing PRs to Github i would recommend you to test your work locally. So you can ensure all test builds on Travis CI were passing. I have prepared an easy way to test your code locally with the help of Docker.
For running the complete static code analysis, it is sufficient to run a make test-all
.
Default settings
I have set some defaults which you can change by setting the following environment variables.
PUPPET_VERSION
Changes the puppet version which will be used for the tests. Defaults to 6.0
.
STRICT_VARIABLES
Sets strict variables on or off. Defaults to yes
.
RVM
Sets the ruby version which will be used for the tests. Defaults to 2.4.1
.
BEAKER_set
Sets the beaker docker target host. Defaults to ubuntu-20.04
.
PUPPET_collection
Sets the puppet version for acceptance tests. Defaults to puppet6
.
Running tests
You can run the following commands to setup and run the testsuite on your local machine.
make build
Build a docker image with a Ruby version which is not available on Docker hub. Check out
https://hub.docker.com/r/derdanne/rvm/
to see if i have already prepared a rvm build for the ruby version
you want to test. Take a look at the Dockerfile located in spec/local-testing
if you want to customize
your builds.
make pull
Pull a prebuild rvm docker image with the Ruby version defined in the variable RVM
.
make install-gems
Install all needed gems locally to vendor/bundle
.
make test-metadata-lint
Run linting of metadata.
make test-lint
Run puppet lint tests.
make test-syntax
Run syntax tests.
make test-rspec
Run rspec puppet tests.
make test-rubocop
Run rubocop tests.
make test-all
Run the whole testsuite.
make test-beaker
Run puppetlabs beaker rspec tests.
Disclaimer
This module based on Harald Skoglund haraldsk@redpill-linpro.com from https://github.com/haraldsk/puppet-module-nfs/ but has been fundementally refactored
Transfer Notice
This plugin was originally authored by Daniel Klockenkaemper dk@marketing-factory.de. The maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.
Previously: https://github.com/derdanne/puppet-nfs
Reference
Table of Contents
Classes
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 dk@marketing-factory.denfs::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 dk@marketing-factory.de 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
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 tonfs::functions::bindmount
: Function: nfs::functions::bindmount This Function exists to 1. manage bindmounts * Daniel Klockenkaemper dk@marketing-factory.denfs::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 dk@marketing-factory.denfs::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
Classes
nfs
Class: nfs::init
-
{Please take a look at} [https://github.com/voxpupuli/puppet-nfs#examples]
-
Daniel Klockenkaemper dk@marketing-factory.de
-
Martin Alfke tuxmea@gmail.com
Parameters
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
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: false
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: false
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: '/export'
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: "*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)"
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: '/srv'
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
- order the loading of classes
- including all needed classes for nfs as a client
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
The following parameters are available in the nfs::client
class:
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: 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
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
- configure nfs as a client
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@betadots.de
nfs::client::package
Class: nfs::client::package
This Function exists to
- install needed packages for nfs clients
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
nfs::client::service
Class: nfs::client::service
This Function exists to
- manage the needed services for nfs clients
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
nfs::params
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 dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
nfs::server
This class exists to
- order the loading of classes
- including all needed classes for nfs as a server
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
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
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
- configure nfs as a server
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
nfs::server::package
Class: nfs::server::package
This Function exists to
- install needed packages for nfs server
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
nfs::server::service
Class: nfs::server::service
This Function exists to
- manage the needed services for nfs server
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Defined types
nfs::client::mount
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 dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
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
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
- manage bindmounts
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
The following parameters are available in the nfs::functions::bindmount
defined type:
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
- manage export creation
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
The following parameters are available in the nfs::functions::create_export
defined type:
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
- manage dir creation
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
The following parameters are available in the nfs::functions::mkdir
defined type:
ensure
Data type: String[1]
Default value: 'present'
nfs::functions::nfsv4_bindmount
Function: nfs::functions::nfsv4_bindmount
This Function exists to
- manage bindmounts for nfs4
- Daniel Klockenkaemper dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
The following parameters are available in the nfs::functions::nfsv4_bindmount
defined type:
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
- 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 dk@marketing-factory.de
- Martin Alfke tuxmea@gmail.com
Parameters
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
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
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v3.0.0 (2024-08-06)
Breaking changes:
- Drop Debian 10 support #203 (bastelfreak)
Implemented enhancements:
- Add CentOS 8/9 support #200 (bastelfreak)
- Add RedHat 9 support #199 (bastelfreak)
- move static data from params.pp to init.pp #198 (bastelfreak)
- Add Puppet 8 compatibility #178 (tuxmea)
Merged pull requests:
- puppet-lint: validate types and documentation #206 (bastelfreak)
- Remove data for EoL operating systems #202 (bastelfreak)
- Delete legacy nodesets #201 (bastelfreak)
- README.md: Add badges and transfer notice #196 (bastelfreak)
- lint auto fix #191 (tuxmea)
v2.1.11 (2023-03-02)
Summary
Features
- update rubocop ruleset
Bugfixes
- fix packaging
- fix rubocop testing
2020-06-08 - Release 2.1.5
Summary
Features
- add support for Ubuntu 20.04 Focal
- update rubocop ruleset
2020-04-26 - Release 2.1.4
Summary
Bugfixes
- fix rubocop testing
- set explicit spec_helper mock_with config to :rspec
- set correct server_nfsv4_servicehelper for Redhat 8
- make sure $clients will be type array
2020-03-29 - Release 2.1.3
Summary
Features
- add beaker set for debian 9
- update beaker
- do not allow puppet 6 rspec tests to fail
- remove deprecated ubuntu-14.04 from acceptance test suite
- add Debian 10 (Buster) support
- dependencies: bump hercules-team/augeasproviders_shellvar
- update dependencies for stdlib and concat
- make nfs::server::export parameter "clients" work with an array or a string
- add RHEL8 configuration, based off the previous "7.5 and above" config
- add RedHat 8 rspec tests
Bugfixes
- use native filter function instead of delete_undef_values
- fix puppet 6 spec tests
- fix linter tests
- fix rubocop cop names
- fix beaker rspec for debian-7 and debian-8
- fix options name typo in README
- ignore export root when bindmount is disabled
- use BEAKER_PUPPET_COLLECTION in all beaker tests
- do not include class by absolute name
- revert use of File without defined()
- update rvm to 2.4.1 for PUPPET_VERSION 4.10.0
2019-02-12 - Release 2.1.2
Summary
Features
- herculesteam-augeasprovides_shellvar has been updated to 3.0.0
2019-02-12 - Release 2.1.1
Summary
Bugfixes
- Dependencies requirements were blocking update/install from the puppet forge
2019-02-08 - Release 2.1.0
Summary
Bugfixes
- do not change SELinux context in bindmounts
- change syntax in create_exports for compatibilty
- fix stuck on restart rpcbind-socket for RHEL
Features
- allow stdlib and concat in versions <6.0.0
- add flag to disable bindmounts for nfs v4
- add idmapd, rpcbind and gssd options
2018-10-09 - Release 2.0.10
Summary
Bugfixes
- fix service management for Ubuntu 18.04 bionic
- moved back to use nfs-kernel-server on Debian for compatibility
Features
- add testing against Puppet 6
2018-07-10 - Release 2.0.9
Summary
Features
- add support for Ubuntu 18.04 bionic
- add testsuite for ubuntu 18.04 bionic
Bugfixes
- fix service helpers on Ubuntu 14.04 trusty
2018-05-18 - Release 2.0.8
Summary
Bugfixes
- update rubocop configuration for version >= 0.53.0 of RuboCop
- according to https://access.redhat.com/solutions/209553 do not enable rpcidmapd on RHEL 7
Features
- add server parameter to export define type
- add easy local testing with beaker and docker
2018-02-21 - Release 2.0.7
Summary
Bugfixes
- disable manage of resource $::nfs::idmapd_file for nfsv3 server
2017-12-14 - Release 2.0.6
Summary
Bugfixes
- set rpcbind enable to false and running to true to work around systemd status indirect for debian based os with systemd
- update documentation for $server_nfsv4_servicehelper
- update puppet-lint task
- fix rubocop testing
2017-10-10 - Release 2.0.5
Summary
Bugfixes
- set $nfs_v4_idmap_domain to 'example.org' when $::domain is undef
- add client service rpcbind.socket for RedHat 7
- set client service rpcbind.service for RedHat 7 to enable => false
- fix service parameters for Debian 7
Features
- update rubocop rules and fix ruby code style
- change type of server_nfsv4_servicehelper to array for allowing multiple helper services
- add acceptance tests for CentOs 6 and 7 and Debian 7 and 8
- add acceptance tests for nfs configured as client
- add testing with Puppet v5
2017-07-11 - Release 2.0.4
Summary
Bugfixes
- fix markdown formatting of README.md
- fix ruby formatting in spec tests
- update puppetlabs/concat dependency
- add install locales on ubuntu-1604 docker for acceptance tests
- add missing documentation for client_services_enable
- reenable client_services_enable for CentOS/Redhat 7
- remove rpc.idmapd from $client_nfsv4_services for Archlinux
- rename rpc.idmapd to nfs-idmapd in $server_nfsv4_servicehelper for archlinux
- update adn fix spec tests
Features
- add use of $::nfs::exports_file instead of fixed filepath
- add Ubuntu Yakkety and Zesty
- add support of Debian 9
- update testmatrix
- update data type for $exports_file, $idmapd_file and $defaults_file to Stdlib::Absolutepath
2017-03-22 - Release 2.0.3
Summary
Bugfixes
- fix systemd indirect status for rpcbind on RHEL7
- replace idmapd service by nfs-common service on Debian Jessie
2017-03-09 - Release 2.0.2
Summary
Bugfixes
- add require of client packages for client::mount mount resource
2017-03-09 - Release 2.0.1
Summary
Features
- add parameter storeconfigs_enabled to optionally disable exporting resources
2017-03-09 - Release 2.0.0
Summary
Features
- drop puppet 3 support on master branch (note: https://github.com/derdanne/puppet-nfs/pull/49#issuecomment-285091678)
- apply additional rubocop rules
- replace all validate functions with datatypes
2016-11-24 - Release 1.0.2
Summary
Features
- updated documentation
- added acceptance tests with rspec-beaker
2016-09-19 - Release 1.0.1
Summary
Features
- updated documentation
- refactor testing suite
2016-09-19 - Release 0.0.17
Summary
Features
- added set owner/group/mode of the exported directory
- rewrite testing suite
Bugfixes
- replace ensure_resource again with "if ! defined(File[$name])"
- fix some small issues
2016-09-08 - Release 0.0.16
Summary
Features
- added possibility to not manage packages by module
- added setting to manage client services
- added service notify from package resources
- added new rspec tests for service and package management
- replaced file resource with ensure_resource('file' ...)
2016-08-26 - Release 0.0.15
Summary
Features
- added setting to manage services
- added setting to setup other options for package ensure
- added create folder for nfsv3
- added setting for server service restart command
Bugfixes
- Exported resource mounts did not work
2016-06-22 - Release 0.0.14
Summary
####Features
- added support for Ubuntu 16.04 (xenial) and Debian 8 (jessie)
Bugfixes
- cosmetic changes to README.md
2016-05-02 - Release 0.0.13
Summary
Bugfixes
- avoid doing a delete($client_nfsv4_services, $server_nfsv4_servicehelper) when $server_nfsv4_servicehelper is undef
- some minor fixes like using absolute scopes and adding commas
Features
- added support for Archlinux
- enhanced testing suite
2016-04-12 - Release 0.0.12
Summary
Bugfixes
- remove nfs-idmap.service from $client_nfsv4_services in params.pp for RHEL 7
- add $server_nfsv4_servicehelper for Suse
- add correct testing for server_nfsv4_servicehelper in server::service
- specified correct puppet dependencies in metadata.json
2016-01-13 - Release 0.0.11
Summary
Bugfixes
- update client mount to use relative devicename to "fsid=root" in nfs v4
- update client mount spec tests
- fix https://github.com/derdanne/puppet-nfs/issues/19
- update gentoo default $client_nfsv4_fstype to reflect syntax update in net-fs/nfs-utils
2015-11-26 - Release 0.0.10
Summary
Bugfixes
- fixed non UTF8 char # in params.pp
Features
- added support for openSUSE and SLES
2015-11-06 - Release 0.0.9
Summary
Bugfixes
- fixed failed manual merge $mount == $name and can't be undef, we need to look at whether or not $share is undef
- fixed sharename handling
- Debian 7.9 defaults to v4
Features
- added option to set mountpoint on exported resource
2015-11-03 - Release 0.0.8
Summary
Bugfixes
- $mount == $name and can't be undef, we need to look at whether or not $share is undef
Features
- Set perms on mounted directories
- Tested Puppet 4.2 compatibility
2015-07-09 - Release 0.0.7
Summary
Bugfixes
- changed Redhat-7 service names to rpcbind.service, nfs-idmap.service, nfs-server.service
- removed nfs-lock in osfamily Debian, since this is not available and needed anymore
- removed file resource in mkdir function
- removed umlauts in my name
- removed unsupported operatingsystem release < Ubuntu 12.04
2015-03-10 - Release 0.0.6
Summary
Features
- add support for OS family Redhat (CentOS, Redhat 6 ...)
- add strict variables support
- improved testing
Bugfixes
- fixed Bug with subscription of services when using as client only module
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.5.0 < 10.0.0)
- puppetlabs/concat (>= 1.1.2 < 10.0.0)
- puppetlabs/transition (>= 0.1.0 < 3.0.0)
- puppet/augeasproviders_core (>= 2.1.5 < 5.0.0)
- puppet/augeasproviders_shellvar (>= 1.2.0 <= 7.0.0)
- puppetlabs/augeas_core (>= 1.2.0 <= 2.0.0)
- puppetlabs/mount_core (>= 1.2.0 <= 2.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2020 Daniel Klockenkaemper Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.