Showing with 1,148 additions and 1,525 deletions.
  1. +38 −0 .devcontainer/README.md
  2. +5 −11 .devcontainer/devcontainer.json
  3. +4 −4 .fixtures.yml
  4. +20 −12 .github/workflows/auto_release.yml
  5. +4 −4 .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml
  6. +2 −2 .github/workflows/release.yml
  7. +3 −3 .github/workflows/static_code_analysis.yaml
  8. +4 −4 .github/workflows/task_acceptance_tests.yaml
  9. +15 −10 .github/workflows/unit_tests_with_nightly_puppet_gem.yaml
  10. +5 −5 .github/workflows/unit_tests_with_released_puppet_gem.yaml
  11. +1 −0 .gitignore
  12. +5 −3 .rubocop.yml
  13. +6 −3 .sync.yml
  14. +0 −6 .vscode/extensions.json
  15. +58 −27 CHANGELOG.md
  16. +35 −22 Gemfile
  17. +60 −0 HISTORY.md
  18. +17 −19 README.md
  19. +214 −172 REFERENCE.md
  20. +3 −1 Rakefile
  21. +2 −2 acceptance/README.md
  22. +2 −2 acceptance/Rakefile
  23. +9 −18 acceptance/helpers.rb
  24. +5 −5 acceptance/pre_suite/00_master_setup.rb
  25. +0 −60 acceptance/tests/test_upgrade_puppet5_to_puppet6.rb
  26. +1 −1 acceptance/tests/test_upgrade_puppet6_to_puppet7.rb
  27. +69 −0 acceptance/tests/test_upgrade_puppet7_to_puppet8.rb
  28. +1 −1 docker/deploy.pp
  29. +1 −2 files/install_puppet.ps1
  30. +0 −41 lib/facter/mco_config.rb
  31. +0 −6 lib/facter/settings.rb
  32. +0 −1 manifests/configure.pp
  33. +10 −15 manifests/init.pp
  34. +10 −10 manifests/install.pp
  35. +2 −2 manifests/install/darwin.pp
  36. +5 −9 manifests/install/solaris.pp
  37. +3 −3 manifests/install/suse.pp
  38. +6 −6 manifests/install/windows.pp
  39. +3 −3 manifests/osfamily/aix.pp
  40. +4 −4 manifests/osfamily/darwin.pp
  41. +2 −4 manifests/osfamily/debian.pp
  42. +8 −9 manifests/osfamily/redhat.pp
  43. +6 −6 manifests/osfamily/solaris.pp
  44. +9 −9 manifests/osfamily/suse.pp
  45. +2 −2 manifests/osfamily/windows.pp
  46. +4 −6 manifests/params.pp
  47. +6 −6 manifests/prepare.pp
  48. +3 −3 manifests/prepare/package.pp
  49. +4 −9 manifests/service.pp
  50. +6 −6 metadata.json
  51. +19 −6 plans/run.pp
  52. +2 −3 rakelib/commits.rake
  53. +0 −70 spec/acceptance/class_spec.rb
  54. BIN spec/acceptance/files/activemq.keystore
  55. BIN spec/acceptance/files/activemq.truststore
  56. +0 −182 spec/acceptance/files/activemq.xml.erb
  57. +0 −63 spec/acceptance/files/ca_crt.pem
  58. +0 −25 spec/acceptance/files/client.cfg.erb
  59. +0 −32 spec/acceptance/files/client.crt
  60. +0 −51 spec/acceptance/files/client.key
  61. +0 −27 spec/acceptance/files/server.cfg.erb
  62. +0 −32 spec/acceptance/files/server.crt
  63. +0 −51 spec/acceptance/files/server.key
  64. +12 −8 spec/classes/puppet_agent_osfamily_aix_spec.rb
  65. +18 −40 spec/classes/puppet_agent_osfamily_darwin_spec.rb
  66. +16 −29 spec/classes/puppet_agent_osfamily_debian_spec.rb
  67. +8 −11 spec/classes/puppet_agent_osfamily_redhat_spec.rb
  68. +19 −61 spec/classes/puppet_agent_osfamily_solaris_spec.rb
  69. +15 −20 spec/classes/puppet_agent_osfamily_suse_spec.rb
  70. +40 −25 spec/classes/puppet_agent_osfamily_windows_spec.rb
  71. +5 −3 spec/classes/puppet_agent_params_spec.rb
  72. +9 −5 spec/classes/puppet_agent_spec.rb
  73. +29 −17 spec/classes/puppet_agent_windows_install_spec.rb
  74. +14 −0 spec/default_facts.yml
  75. +6 −89 spec/spec_helper_acceptance.rb
  76. +64 −14 spec/spec_helper_local.rb
  77. +1 −0 task_spec/Rakefile
  78. +105 −63 task_spec/spec/acceptance/init_spec.rb
  79. +11 −0 task_spec/spec/acceptance/nodesets/docker/ubuntu-20.04.yml
  80. +1 −0 task_spec/spec/spec_helper_acceptance.rb
  81. +5 −1 tasks/install.json
  82. +5 −1 tasks/install_powershell.json
  83. +7 −1 tasks/install_powershell.ps1
  84. +5 −1 tasks/install_shell.json
  85. +20 −23 tasks/install_shell.sh
  86. +11 −1 tasks/run.json
  87. +15 −7 tasks/run.rb
  88. +4 −4 types/config.pp
38 changes: 38 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# devcontainer


For format details, see https://aka.ms/devcontainer.json.

For config options, see the README at:
https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet

``` json
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pdk --version",
}
```



16 changes: 5 additions & 11 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash"
}
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pdk --version",
}
8 changes: 4 additions & 4 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ fixtures:
forge_modules:
stdlib:
repo: "puppetlabs/stdlib"
ref: "6.0.0"
ref: "8.4.0"
inifile:
repo: "puppetlabs/inifile"
ref: "2.4.0"
ref: "5.3.0"
apt:
repo: "puppetlabs/apt"
ref: "7.4.2"
ref: "9.0.0"
translate:
repo: "puppetlabs/translate"
ref: "1.2.0"
yumrepo_core:
repo: "puppetlabs/yumrepo_core"
facts:
repo: "puppetlabs/facts"
ref: "0.5.1"
ref: "1.4.0"
symlinks:
puppet_agent: "#{source_dir}"
32 changes: 20 additions & 12 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-20.04

steps:

- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
Expand All @@ -25,18 +26,19 @@ jobs:
run: |
echo STEP_ID="auto-release" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
if: ${{ github.repository_owner == 'puppetlabs' }}
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false


# We use the dev tools image here because the PDK image does not have the
# build tools necessary to compile native extensions.
- name: "PDK Release prep"
uses: docker://puppet/iac_release:ci
uses: docker://puppet/puppet-dev-tools:4.x
with:
args: 'release prep --force'
args: 'pdk release prep --force --debug'
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -46,38 +48,44 @@ jobs:
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: "Commit changes"
- name: "Check if a release is necessary"
if: ${{ github.repository_owner == 'puppetlabs' }}
id: check
run: |
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
- name: "Commit changes"
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
run: |
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "(packaging) Release prep v${{ steps.gv.outputs.ver }}"
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
- name: Create Pull Request
id: cpr
uses: puppetlabs/peter-evans-create-pull-request@v3
if: ${{ github.repository_owner == 'puppetlabs' }}
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "(packaging) Release prep v${{ steps.gv.outputs.ver }}"
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
branch: "release-prep"
delete-branch: true
title: "Release prep v${{ steps.gv.outputs.ver }}"
body: |
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}.
Please verify before merging:
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml) run is green
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
labels: "maintenance"

- name: PR outputs
if: ${{ github.repository_owner == 'puppetlabs' }}
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: "Honeycomb: Record finish step"
if: ${{ always() }}
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2022' ]
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2022' ]
puppet_version: [ 6, 7 ]
include:
- puppet_version: 6
ruby: 2.5
- puppet_version: 7
ruby: 2.7

- os: 'ubuntu-18.04'
- os: 'ubuntu-20.04'
os_type: 'Linux'
env_set_cmd: 'export '
gem_file: 'puppet-latest.gem'
- os: 'macos-10.15'
- os: 'macos-latest'
os_type: 'macOS'
env_set_cmd: 'export '
gem_file: 'puppet-latest-universal-darwin.gem'
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: Run checks

env:
ruby_version: 2.6
ruby_version: '2.7'

runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout current PR code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/task_acceptance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
name: On ${{ matrix.os }}
strategy:
matrix:
os: [ 'centos-7', 'ubuntu-18.04', 'rocky-8' ]
os: [ 'centos-7', 'ubuntu-20.04', 'rocky-8' ]

env:
ruby_version: 2.5.9
ruby_version: 2.5
GEM_BOLT: true
BEAKER_debug: true
BEAKER_set: docker/${{ matrix.os }}

runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-20.04'
steps:
- name: Checkout current PR code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install docker
uses: docker/setup-buildx-action@v1
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/unit_tests_with_nightly_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,35 @@ jobs:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2022' ]
puppet_version: [ 6, 7 ]
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2022' ]
puppet_version: [ '7', '8' ]
include:
- puppet_version: 6
ruby: 2.5.8
- puppet_version: 7
ruby: 2.7
- puppet_version: '7'
ruby: '2.7'
- puppet_version: '8'
ruby: '3.2'

- os: 'ubuntu-18.04'
- os: 'ubuntu-20.04'
os_type: 'Linux'
env_set_cmd: 'export '
gem_file: 'puppet-latest.gem'
- os: 'macos-10.15'
- os: 'macos-latest'
os_type: 'macOS'
env_set_cmd: 'export '
gem_file: 'puppet-latest-universal-darwin.gem'
- os: 'windows-2022'
os_type: 'Windows'
env_set_cmd: '$env:'
gem_file: 'puppet-latest-x64-mingw32.gem'
# setup-ruby uses ucrt for newer Rubies, but we only support mingw
# in our Windows Puppet nightly gems. For now, we'll just install
# the universal gem and manually install the ffi dependency
gem_file: 'puppet-latest.gem'
extra_steps: 'gem install ffi --version 1.15.5'

runs-on: ${{ matrix.os }}
steps:
- name: Checkout current PR code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
Expand All @@ -45,6 +49,7 @@ jobs:

- name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem
run: |
${{ matrix.extra_steps }}
curl https://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem --location
gem install puppet.gem -N
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unit_tests_with_released_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2022' ]
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2022' ]
puppet_version: [ 6, 7 ]
include:
- puppet_version: 6
ruby: 2.5.8
ruby: 2.5
- puppet_version: 7
ruby: 2.7

- os: 'ubuntu-18.04'
- os: 'ubuntu-20.04'
os_type: 'Linux'
- os: 'macos-10.15'
- os: 'macos-latest'
os_type: 'macOS'
- os: 'windows-2022'
os_type: 'Windows'
Expand All @@ -32,7 +32,7 @@ jobs:
PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0
steps:
- name: Checkout current PR code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
.vscode/
8 changes: 5 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.4'
TargetRubyVersion: '2.5'
Include:
- "**/*.rb"
Exclude:
Expand Down Expand Up @@ -78,10 +78,12 @@ RSpec/MessageSpies:
EnforcedStyle: receive
Style/Documentation:
Exclude:
- files/*
- files/rb_task_helper.rb
- lib/puppet/parser/functions/**/*
- spec/**/*
- tasks/*
- tasks/delete_local_filebucket.rb
- tasks/facts_diff.rb
- tasks/run.rb
Style/WordArray:
EnforcedStyle: brackets
Performance/AncestorsInclude:
Expand Down
Loading