Skip to content

Commit

Permalink
Merge pull request #178 from tuxmea/puppet8
Browse files Browse the repository at this point in the history
Add Puppet 8 compatibility
  • Loading branch information
tuxmea authored Jun 10, 2024
2 parents 3310232 + 013b898 commit 8409ddf
Show file tree
Hide file tree
Showing 25 changed files with 1,872 additions and 725 deletions.
8 changes: 2 additions & 6 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ fixtures:
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
augeasproviders_core: "https://github.com/voxpupuli/puppet-augeasproviders_core.git"
augeasproviders_shellvar: "https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git"
augeas_core:
repo: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
puppet_version: ">= 6.0.0"
mount_core:
repo: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
puppet_version: ">= 6.0.0"
augeas_core: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
mount_core: "https://github.com/puppetlabs/puppetlabs-mount_core.git"
transition: "https://github.com/puppetlabs/puppetlabs-transition.git"
symlinks:
"nfs": "#{source_dir}"
127 changes: 0 additions & 127 deletions .github/workflows/test-suite.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
- 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()
- 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
- herculesteam-augeasprovides_shellvar has been updated to 3.0.0

## 2019-02-12 - Release 2.1.1
### Summary
Expand Down Expand Up @@ -130,7 +130,7 @@
- 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
- fix service parameters for Debian 7

#### Features
- update rubocop rules and fix ruby code style
Expand All @@ -149,7 +149,7 @@
- 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
- 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

Expand Down
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# nfs

[![Build Status](https://github.com/voxpupuli/puppet-nfs/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-nfs/actions?query=workflow%3ACI)
[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-nfs/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-nfs)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)

This module was migrated from Daniel Klockenkaemper <[email protected]> to Vox Pupuli.

#### Table of Contents
1. [Module Description - What the module does and why it is useful](#module-description)
2. [Setup - The basics of getting started with derdanne-nfs](#setup)
* [What derdanne-nfs affects](#what-derdanne-nfs-affects)
2. [Setup - The basics of getting started with puppet-nfs](#setup)
* [What puppet-nfs affects](#what-puppet-nfs-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with derdanne-nfs](#beginning-with-derdanne-nfs)
* [Beginning with puppet-nfs](#beginning-with-puppet-nfs)
3. [Usage - Configuration options and additional functionality](#usage)
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
Expand All @@ -24,10 +33,10 @@ and 'client_enabled'. It also has some dependencies on newer stdlib functions li

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/derdanne/puppet-nfs or send me an email.
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/derdanne/puppet-nfs/pull/49#issuecomment-285091678).
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
Expand All @@ -40,18 +49,18 @@ Warning: I've introduced new dependencies with version 2.1.0 which were needed t

## Setup

### What derdanne-nfs affects
### 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
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 derdanne-nfs module.
have these modules installed to use puppet-nfs module.

### Beginning with derdanne-nfs
### Beginning with puppet-nfs

On a nfs server the following code is sufficient to get all packages installed and services
running to use nfs:
Expand Down Expand Up @@ -110,7 +119,7 @@ This will mount /data on client in /share/data.
nfs_v4_client => true,
nfs_v4_idmap_domain => $::domain,
}
nfs::client::mount { '/share/data':
server => '192.168.0.1',
share => 'data',
Expand Down Expand Up @@ -368,26 +377,26 @@ This will mount /data on client in /share/data.
**Puppet:**

```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 |>>
}
Expand Down Expand Up @@ -611,7 +620,7 @@ This will mount /data on client in /share/data.
String. 'Nobody-User' option for idmapd. Defaults to <tt>nobody</tt>.

##### `nfs_v4_idmap_nobody_group`
String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.
String. 'Nobody-Group' option for idmapd. Defaults to <tt>nobody</tt> or <tt>nogroup</tt>.

##### `client_rpcbind_config`
String. It defines the location of the file with the rpcbind config.
Expand Down Expand Up @@ -681,18 +690,18 @@ This will mount /data on client in /share/data.
##### `bind`
String. Sets the bind options setted in /etc/fstab for the bindmounts created.
Defaults to <tt>rbind</tt>. When you have any submounts in your exported folders,
the rbind option will submount them in the bindmount folder. You have to set the
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:

```puppet
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 <tt>mounted</tt>
Expand Down Expand Up @@ -746,19 +755,19 @@ puppet > 3.2.0
augeas

## Limitations
If you want to have specific package versions installed you may manage the needed packages outside of this
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](https://github.com/derdanne/puppet-nfs).
you can contribute to this module on [Github](https://github.com/voxpupuli/puppet-nfs).

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.
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`.
For running the complete static code analysis, it is sufficient to run a `make test-all`.

### Default settings

Expand Down Expand Up @@ -790,7 +799,7 @@ You can run the following commands to setup and run the testsuite on your local

#### `make build`

Build a docker image with a Ruby version which is not available on Docker hub. Check out
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.
Expand Down
Loading

0 comments on commit 8409ddf

Please sign in to comment.