Skip to content

Commit 7b4719e

Browse files
committed
merge
2 parents 60ed203 + b04915d commit 7b4719e

File tree

16 files changed

+188
-69
lines changed

16 files changed

+188
-69
lines changed

.devcontainer/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:3
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
RUN curl -L https://apt.puppet.com/puppet-tools-release-focal.deb -o /tmp/puppet-tools-release-focal.deb && \
5+
sudo dpkg -i /tmp/puppet-tools-release-focal.deb && \
6+
sudo apt-get update && \
7+
sudo apt-get install pdk

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"build": { "dockerfile": "Dockerfile" },
3+
"features": {
4+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
5+
"ghcr.io/devcontainers/features/github-cli:1": {}
6+
}
7+
}

.fixtures.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ fixtures:
22
repositories:
33
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
44
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
5-
augeasproviders_core: "https://github.com/hercules-team/augeasproviders_core.git"
6-
augeasproviders_shellvar: "https://github.com/hercules-team/augeasproviders_shellvar.git"
5+
augeasproviders_core: "https://github.com/voxpupuli/puppet-augeasproviders_core.git"
6+
augeasproviders_shellvar: "https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git"
77
augeas_core:
88
repo: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
99
puppet_version: ">= 6.0.0"

.github/workflows/test-suite.yaml

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,63 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
test-static:
10+
test-static-current:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
puppet: [5.0, 6.0, 7.0]
14+
puppet: [7.22.0]
15+
ruby: [2.7.7, 3.0.5, 3.1.3]
16+
17+
name: Static code analysis
18+
runs-on: ubuntu-20.04
19+
permissions:
20+
contents: read
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Set up Ruby
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{ matrix.ruby }}
29+
bundler-cache: true
30+
env:
31+
PUPPET_VERSION: ${{ matrix.puppet }}
32+
33+
- name: Run metadata lint
34+
run: |
35+
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake metadata_lint
36+
37+
- name: Run puppet lint
38+
run: |
39+
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake lint
40+
41+
- name: Run puppet syntax check
42+
run: |
43+
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake syntax
44+
45+
- name: Run puppet rspec tests
46+
run: |
47+
PUPPET_VERSION=${{ matrix.puppet }} STRICT_VARIABLES=yes bundle exec rake spec
48+
49+
- name: Run rubocop tests
50+
run: |
51+
PUPPET_VERSION=${{ matrix.puppet }} bundle exec rake rubocop
52+
53+
test-static-old:
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
puppet: [5.5.22, 6.29.0]
1558
ruby: [2.5.9, 2.6.9]
1659

1760
name: Static code analysis
18-
runs-on: ubuntu-latest
61+
runs-on: ubuntu-20.04
1962
permissions:
2063
contents: read
2164

2265
steps:
23-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v3
2467

2568
- name: Set up Ruby
2669
uses: ruby/setup-ruby@v1
@@ -55,10 +98,10 @@ jobs:
5598
fail-fast: false
5699
matrix:
57100
puppet: [puppet6, puppet7]
58-
beakerset: [ubuntu-18.04, ubuntu-20.04, centos-7, debian-10, debian-11]
101+
beakerset: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-7, debian-10, debian-11]
59102

60103
name: Integration tests
61-
runs-on: ubuntu-latest
104+
runs-on: ubuntu-20.04
62105
permissions:
63106
contents: read
64107

@@ -68,7 +111,7 @@ jobs:
68111
- name: Set up Ruby
69112
uses: ruby/setup-ruby@v1
70113
with:
71-
ruby-version: 2.5.9
114+
ruby-version: 2.6.9
72115
bundler-cache: true
73116
env:
74117
BEAKER_set: ${{ matrix.beakerset }}
@@ -81,4 +124,4 @@ jobs:
81124
env:
82125
BEAKER_set: ${{ matrix.beakerset }}
83126
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
84-
PUPPET_INSTALL_TYPE: agent
127+
PUPPET_INSTALL_TYPE: agent

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require: rubocop-rspec
22

33
AllCops:
4-
NewCops: enable
5-
TargetRubyVersion: 2.5
4+
NewCops: disable
5+
TargetRubyVersion: 2.6
66
Include:
77
- '**/*.rb'
88
Exclude:

Gemfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ group :test do
2121
gem 'puppet-lint-unquoted_string-check', require: false
2222
gem 'puppet-lint-variable_contains_upcase', require: false
2323
gem 'puppet-lint-version_comparison-check', require: false
24-
gem 'puppet-strings', require: false, git: 'https://github.com/puppetlabs/puppetlabs-strings.git', branch: 'main'
24+
gem 'puppet-strings', require: false
2525
gem 'puppet-syntax', require: false
2626
gem 'puppetlabs_spec_helper', require: false
2727
gem 'semantic_puppet', require: false
2828
gem 'rake', require: false
2929
gem 'rspec', require: false
3030
gem 'rspec-core', require: false
31-
gem 'rspec-puppet', require: false, git: 'https://github.com/rodjek/rspec-puppet.git'
31+
gem 'rspec-puppet', require: false, git: 'https://github.com/puppetlabs/rspec-puppet.git'
3232
gem 'rspec-puppet-facts', require: false
3333
gem 'rspec-puppet-utils', require: false
3434
gem 'rubocop', require: false
@@ -38,8 +38,6 @@ end
3838

3939
group :development do
4040
gem 'guard-rake', require: false
41-
gem 'travis', require: false
42-
gem 'travis-lint', require: false
4341
end
4442

4543
if RUBY_VERSION >= '2.3.0'

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ifneq ($(origin PUPPET_VERSION), undefined)
22
puppet_version := ${PUPPET_VERSION}
33
else
4-
puppet_version := 7.0
4+
puppet_version := 7.20.0
55
endif
66

77
ifneq ($(origin STRICT_VARIABLES), undefined)
@@ -13,13 +13,15 @@ endif
1313
ifneq ($(origin RVM), undefined)
1414
rvm := ${RVM}
1515
else
16-
rvm := 2.5.0
16+
rvm := 3.1.3
1717
endif
1818

19+
export rvm_beaker := 2.6.9
20+
1921
ifneq ($(origin BEAKER_set), undefined)
2022
beaker_set := ${BEAKER_set}
2123
else
22-
beaker_set := ubuntu-20.04
24+
beaker_set := ubuntu-22.04
2325
endif
2426

2527
ifneq ($(origin PUPPET_collection), undefined)
@@ -29,12 +31,12 @@ else
2931
endif
3032

3133
DOCKER_CMD := docker run -it --rm -v $$(pwd):/puppet/module derdanne/rvm:$(rvm) /bin/bash -l -c
32-
PREPARE := rm -f Gemfile.lock && $(DOCKER_CMD) "PUPPET_VERSION=$(puppet_version) bundle install --quiet --without system_tests development --path=vendor/bundle"
34+
PREPARE := $(DOCKER_CMD) "PUPPET_VERSION=$(puppet_version)" bundle config set --local without 'system_tests development' path 'vendor/bundle' && rm -f Gemfile.lock && $(DOCKER_CMD) "PUPPET_VERSION=$(puppet_version) bundle install --quiet"
3335

34-
DOCKER_CMD_BEAKER := docker run --net host --privileged -it --rm -v $$(pwd):/puppet/module -v /var/run/docker.sock:/var/run/docker.sock derdanne/rvm:$(rvm) /bin/bash -l -c
35-
PREPARE_BEAKER := rm -f Gemfile.lock && $(DOCKER_CMD) "bundle install --quiet --without system_tests development --path=vendor/bundle"
36+
DOCKER_CMD_BEAKER := docker run --net host --privileged -it --rm -v $$(pwd):/puppet/module -v /var/run/docker.sock:/var/run/docker.sock derdanne/rvm:$(rvm_beaker) /bin/bash -l -c
37+
PREPARE_BEAKER := rm -f Gemfile.lock && $(DOCKER_CMD_BEAKER) "bundle config set --local without 'system_tests development path 'vendor/bundle'' && bundle install --quiet"
3638

37-
VARIABLES := echo "PUPPET_VERSION=$(puppet_version), STRICT_VARIABLES=$(strict_variables), RVM=$(rvm)"
39+
VARIABLES := echo "PUPPET_VERSION=$(puppet_version), STRICT_VARIABLES=$(strict_variables), RVM=$(rvm), RVM_BEAKER=$(rvm_beaker)"
3840

3941
build:
4042
@cd spec/local-testing && docker build --squash --build-arg RUBY_VERSION=$(rvm) -t derdanne/rvm:$(rvm) .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,12 @@ This will mount /data on client in /share/data.
464464

465465
##### `nfs_v4`
466466
Boolean. If set to <tt>true</tt>, this module will use nfs version 4
467-
for exporting and mounting nfs resources.
467+
for exporting and mounting nfs resources. It defaults to <tt>true</tt>.
468468

469469
##### `nfs_v4_client`
470470
Boolean. If set to <tt>true</tt>, this module will use nfs version 4
471471
for mounting nfs resources. If set to <tt>false</tt> it will use nfs
472-
version 3 to mount nfs resources. It defaults to the setting of `nfs_v4`
472+
version 3 to mount nfs resources. It defaults to <tt>true</tt>.
473473

474474
##### `exports_file`
475475
String. It defines the location of the file with the nfs export resources used

manifests/functions/nfsv4_bindmount.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
$bind,
3434
$ensure = 'mounted',
3535
) {
36-
$expdir = "${nfs::server::nfs_v4_export_root}/${v4_export_name}"
36+
$normalize_export_root = regsubst($nfs::server::nfs_v4_export_root, '/$', '')
37+
$expdir = "${normalize_export_root}/${v4_export_name}"
3738
nfs::functions::mkdir { $expdir:
3839
ensure => $ensure,
3940
}

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
$server_service_name = 'nfs-kernel-server'
155155
$client_gssdopt_name = 'GSSDARGS'
156156
}
157-
'focal', 'bionic', 'focal': {
157+
'bionic', 'focal', 'jammy', 'kinetic': {
158158
$client_services = {'rpcbind' => {}}
159159
$client_gssd_service_name = { 'rpc-gssd' => {
160160
ensure => 'running',

0 commit comments

Comments
 (0)