Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 7.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'ghoneycutt-nfs', '2.3.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-nfs
Puppet module to manage NFS client and server
Components
Server
- Manage NFS server
- Setup of exports
Idmap
- Manage idmapd
- Setup of configuration for idmapd
Compatibility
This module has been tested to work on the following systems with Puppet
v4, v5 and v6 using the ruby versions that are shipped with each. See
.travis.yml
for the exact matrix.
- EL 6
- EL 7
- EL 8
- Solaris 10 (client only)
- Solaris 11 (client only)
- Suse 11 (client only)
- Suse 12 (client only)
Suse notes
If using Suse, there is a known issue regarding reverse path filtering which can be solved through kernel tuning.
http://www.novell.com/support/kb/doc.php?id=7007649
===
Parameters
hiera_hash
Boolean to use hiera_hash which merges all found instances of nfs::mounts in Hiera. This is useful for specifying mounts at different levels of the hierarchy and having them all included in the catalog.
- Default: true
nfs_package
Name of the NFS package. May be a string or an array.
- Default: Uses system defaults as specified in module
nfs_service
Name of the NFS service
- Default: Uses system defaults as specified in module
mounts
Hash of mounts to be mounted on system. See below.
- Default: undef
server
Boolean to specify if the system is an NFS server.
- Default: false
exports_path
The location of the config file.
- Default: '/etc/exports'
exports_owner
The owner of the config file.
- Default: 'root'
exports_group
The group for the config file.
- Default: 'root'
exports_mode
The mode for the config file.
- Default: '0644'
===
Class nfs::idmap
Parameters
idmap_package
String of the idmap package name.
- Default: Uses system defaults as specified in module
idmapd_conf_path
The location of the config file.
- Default: '/etc/idmapd.conf'
idmapd_conf_owner
The owner of the config file.
- Default: 'root'
idmapd_conf_group
The group for the config file.
- Default: 'root'
idmapd_conf_mode
The mode for the config file.
- Default: '0644'
idmapd_service_name
String of the service name.
- Default: Uses system defaults as specified in module
idmapd_service_ensure
Boolean value of ensure parameter for idmapd service. Default is based on the platform. If running EL7 as an nfs-server, this must be set to 'running'.
- Default: Uses system defaults as specified in module
idmapd_service_enable
Boolean value of enable parameter for idmapd service.
- Default: true
idmapd_service_hasstatus
Boolean value of hasstatus parameter for idmapd service.
- Default: true
idmapd_service_hasrestart
Boolean value of hasrestart parameter for idmapd service.
- Default: true
idmap_domain
String value of domain to be set as local NFS domain.
- Default:
$::domain
ldap_server
String value of ldap server name.
- Default: undef
ldap_base
String value of ldap search base.
- Default: undef
local_realms
String or array of local kerberos realm names.
- Default:
$::domain
translation_method
String or array of mapping method to be used between NFS and local IDs. Valid values is nsswitch, umich_ldap or static.
- Default: 'nsswitch'
nobody_user
String of local user name to be used when a mapping cannot be completed.
- Default: 'nobody'
nobody_group
String of local group name to be used when a mapping cannot be completed.
- Default: 'nobody'
verbosity
Integer of verbosity level.
- Default: 0
pipefs_directory
String of the directory for rpc_pipefs.
- Default: undef - Uses system defaults as specified in module
===
Manage mounts
This works by iterating through the nfs::mounts hash and calling the types::mount resource. Thus, you can provide any valid parameter for mount. See the Type Reference for a complete list.
Example:
Mount nfs.example.com:/vol1 on /mnt/vol1 and nfs.example.com:/vol2 on /mnt/vol2
nfs::mounts:
/mnt/vol1:
device: nfs.example.com:/vol1
options: rw,rsize=8192,wsize=8192
fstype: nfs
old_log_file_mount:
name: /mnt/vol2
device: nfs.example.com:/vol2
fstype: nfs
Manage exports
This module manages /etc/exports
though does not manage its contents.
Suggest using the file_line
resource in your profile as demonstrated
below.
class profile::nfs_server {
include ::nfs
file_line { 'exports_home':
path => '/etc/exports',
line => '/home 192.168.42.0/24(sync,no_root_squash)',
}
file_line { 'exports_data':
path => '/etc/exports',
line => '/data 192.168.23.0/24(sync,no_root_squash,rw)',
}
}
Creating Hiera data from existing system
This module contains ext/fstabnfs2yaml.rb
, which is a script that will
parse /etc/fstab
and print out the nfs::mounts hash in YAML with which
you can copy/paste into Hiera.
Changelog
v2.3.0 (2019-11-13)
Merged pull requests:
- Support EL 8 #85 (anders-larsson)
v2.2.0 (2019-01-04)
Merged pull requests:
- Add support for Puppet 6 #82 (Phil-Friderici)
v2.1.0 (2019-01-04)
Closed issues:
- Get spec testing up to our standards #79
Merged pull requests:
- Update spec tests (RTM) #81 (Phil-Friderici)
v2.0.0 (2017-09-05)
Closed issues:
- idmapd service should not be running on RedHat 7 #77
- client services #76
- mount directories #75
- ghoneycutt-common dependency conflict? #73
- nfs_service missing dependencies under Solaris/OmniOS #63
- Is there an inheritance issue in nfs::server? #50
- On RHEL7 $default_nfs_service is undef should be 'nfs-server'? #49
- Module doesn't function.... #48
- CentOS requires the package redhat-lsb #41
- suse 10 or 11 or both need sysconfig set to use TCP for nfs mount protocol #12
- SuSE and Solaris support #4
- create define - nfs::export #1
Merged pull requests:
- Document known issue with Suse #80 (ghoneycutt)
- V2 #78 (ghoneycutt)
v1.13.0 (2017-02-27)
Merged pull requests:
- Support Puppet >= 4.9 #74 (Phil-Friderici)
v1.12.1 (2016-11-18)
Merged pull requests:
- Fix deps #72 (ghoneycutt)
v1.12.0 (2016-08-31)
Merged pull requests:
- Add support for Ruby v2.3.1 #71 (ghoneycutt)
v1.11.3 (2016-05-24)
Merged pull requests:
- Support Puppet 4.5 #70 (Phil-Friderici)
v1.11.2 (2015-12-15)
v1.11.1 (2015-12-15)
Closed issues:
- nfs::mount ensure: mounted does not work #45
Merged pull requests:
- Puppet v430 #64 (ghoneycutt)
v1.11.0 (2015-09-18)
Closed issues:
- Using nfs::idmap on Debian 7, a proposed patch #61
- On RHEL 6.3 using facter version 1.6.18 the fact "$operatingsystemmajrelease" is not defined this affects nfs::idmap.pp #58
- Missing package for idmap service on rhel7 in nfs::idmap #55
- puppet 4 compatibility #53
Merged pull requests:
- Add Suse 12 support #62 (jwennerberg)
- Fix Travis-ci matrix so that each feature release is tested #60 (ghoneycutt)
- Test against latest bugfix of each feature release #57 (ghoneycutt)
- Remove lsb #51 (rnelson0)
v1.10.0 (2015-05-25)
Merged pull requests:
- WIP #54 (ghoneycutt)
v1.9.0 (2015-05-20)
v1.8.1 (2015-05-19)
Merged pull requests:
- Fix style issue - missing default for case statement #52 (ghoneycutt)
- Update travis config #47 (ghoneycutt)
v1.8.0 (2015-02-16)
Closed issues:
- Tight coupling #3
Merged pull requests:
- Add support for EL7 #44 (ghoneycutt)
v1.7.0 (2014-05-28)
Closed issues:
- NFS server or client service(s)? #35
- Allow setting NFS service enabled = false #31
- puppet module install ghoneycutt/nfs failes #30
Merged pull requests:
- Prep for 1 7 0 release #39 (ghoneycutt)
- Solaris11 #38 (ghoneycutt)
- Typos fixed #34 (solsglasses)
v1.6.3 (2014-02-06)
Merged pull requests:
- Update README with idmap and server information #29 (kentjohansson)
v1.6.2 (2014-02-01)
Merged pull requests:
- Support Puppet v3.4 and Ruby v2.0.0 #28 (ghoneycutt)
v1.6.1 (2014-01-28)
Merged pull requests:
- Fixed: deprecated variables access in templates #27 (Phil-Friderici)
- Gemfile to reflect that 2.7 support has been dropped #26 (ghoneycutt)
- Travis #25 (ghoneycutt)
- Remove Travis work around for ruby v1.8.7 #24 (ghoneycutt)
v1.6.0 (2014-01-17)
Merged pull requests:
- Support suse 10 #23 (ghoneycutt)
v1.5.0 (2014-01-14)
Merged pull requests:
- 330 support merge hash #21 (ghoneycutt)
- Rakefile to conform with other modules #20 (ghoneycutt)
v1.4.0 (2013-12-21)
Merged pull requests:
- Support solaris suse ubuntu #19 (ghoneycutt)
v1.3.0 (2013-11-25)
Merged pull requests:
- Refactor nfs mounts #16 (ghoneycutt)
v1.2.0 (2013-11-22)
Merged pull requests:
- v1.2.0 - Support Debian 6 as nfs client #15 (ghoneycutt)
v1.1.0 (2013-09-27)
Closed issues:
- include rpcbind instead of managing the rpcbind service #6
Merged pull requests:
- Add misc spec tests #14 (MWinther)
- Added generic mount functionality #13 (MWinther)
- Update testing framework for Travis #11 (jwennerberg)
- Include rpcbind module instead of managing the rpcbind serivce #10 (jwennerberg)
- Puppet v3 support #9 (ghoneycutt)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- ghoneycutt/common (>= 1.7.0 < 2.0.0)
- puppetlabs/mount_core (>= 1.0.2 <2.0.0)
- ghoneycutt/rpcbind (>= 1.7.0 < 2.0.0)
- ghoneycutt/types (>= 1.12.0 < 2.0.0)
- puppetlabs/stdlib (>= 4.16.0 < 6.0.0)
Copyright (C) 2013-2019 Garrett Honeycutt <code@garretthoneycutt.com> 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.