mirror of
https://github.com/voxpupuli/puppet-hashi_stack.git
synced 2025-05-24 10:55:00 +01:00
Compare commits
105 commits
Author | SHA1 | Date | |
---|---|---|---|
|
a1548cf7e5 | ||
|
5f04b07e9c | ||
|
9d17a4d4f8 | ||
|
4e104e262f | ||
|
13553def3e | ||
|
2db021c6e2 | ||
|
5fee23bff9 | ||
|
d56416cfb7 | ||
|
d519ef600d | ||
|
2eaae539d6 | ||
|
fa2a7bff68 | ||
|
a734fba308 | ||
|
9076e5e97a | ||
|
a635338303 | ||
|
0b736b0ef5 | ||
|
f383d32565 | ||
|
0116f1caf5 | ||
|
b6edd3777a | ||
|
cc529dea62 | ||
|
b24a437c8c | ||
|
7777366f79 | ||
|
0c133afe4b | ||
|
f6f808c6b3 | ||
|
7073f88b8c | ||
|
edb01d72b1 | ||
|
d9d0e30bcf | ||
|
b0baa714f9 | ||
|
5f806e0a8b | ||
|
7934180513 | ||
|
5aebbda1fe | ||
|
53c5611c17 | ||
|
2e6986a13f | ||
|
eb19c0ada2 | ||
|
45f3539aab | ||
|
4e30760edd | ||
|
f79ebaa3b7 | ||
|
51aead9b5b | ||
|
4371c15313 | ||
|
9939845bb5 | ||
|
f85c0e1c91 | ||
|
a2fcd501c2 | ||
|
5362eacb42 | ||
|
49430fe22c | ||
|
b5efffa046 | ||
|
2c73977159 | ||
|
111a70112e | ||
|
90be685aef | ||
|
a9b8122a4f | ||
|
1adcdf5092 | ||
|
d01ef71f0f | ||
|
07e2d9c55a | ||
|
55197bfb6d | ||
|
cfb42236a2 | ||
|
7c499e9af0 | ||
|
05b2be143d | ||
|
d5870ce6f4 | ||
|
7eae45628b | ||
|
f7b6e2de9d | ||
|
df00263284 | ||
|
fd70af1b0b | ||
|
1b767380d4 | ||
|
c6790e40c2 | ||
|
95853efb4e | ||
|
6b47544e6e | ||
|
32ad7df19e | ||
|
283f474dd1 | ||
|
e1ddfd95e2 | ||
|
eece189d0e | ||
|
132ae81120 | ||
|
d1218a7291 | ||
|
957f1627ba | ||
|
9ea909bfcc | ||
|
bed3690c6f | ||
|
597ad8c9c0 | ||
|
4d7fc4f2d4 | ||
|
e2ada9acb1 | ||
|
49edc2e297 | ||
|
8197cc3dad | ||
|
ea0978356a | ||
|
fb2171dde6 | ||
|
b2e1055164 | ||
|
a124b9cf9e | ||
|
41decd6cee | ||
|
d920244e2f | ||
|
d93f4a80b6 | ||
|
93f6652b19 | ||
|
918505aea1 | ||
|
ce7ea5e33b | ||
|
d17975a535 | ||
|
4a6e879d72 | ||
|
ddc072a388 | ||
|
b22e05176a | ||
|
226505f4fd | ||
|
4032596ba4 | ||
|
413d7bbf50 | ||
|
f92d991d9a | ||
|
03ddb48a19 | ||
|
ab0c6e18ec | ||
|
792465f3d6 | ||
|
1844a30bf9 | ||
|
2feb104b49 | ||
|
4a0d31fbf0 | ||
|
14a3988eb8 | ||
|
460012fd9e | ||
|
7b4da79e58 |
32 changed files with 509 additions and 316 deletions
|
@ -1,6 +1,7 @@
|
||||||
# editorconfig.org
|
# editorconfig.org
|
||||||
|
|
||||||
# MANAGED BY MODULESYNC
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ fixtures:
|
||||||
repositories:
|
repositories:
|
||||||
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
|
apt: "https://github.com/puppetlabs/puppetlabs-apt.git"
|
||||||
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
|
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
|
||||||
yum: "https://github.com/voxpupuli/puppet-yum.git"
|
|
||||||
yumrepo_core:
|
yumrepo_core:
|
||||||
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core.git"
|
repo: "https://github.com/puppetlabs/puppetlabs-yumrepo_core.git"
|
||||||
puppet_version: ">= 6.0.0"
|
puppet_version: ">= 6.0.0"
|
||||||
|
|
68
.github/CONTRIBUTING.md
vendored
68
.github/CONTRIBUTING.md
vendored
|
@ -25,7 +25,7 @@ By participating in this project you agree to abide by its terms.
|
||||||
|
|
||||||
* Fork the repo.
|
* Fork the repo.
|
||||||
* Create a separate branch for your change.
|
* Create a separate branch for your change.
|
||||||
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
|
* We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
|
||||||
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
|
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
|
||||||
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
|
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
|
||||||
* Squash your commits down into logical components. Make sure to rebase against our current master.
|
* Squash your commits down into logical components. Make sure to rebase against our current master.
|
||||||
|
@ -124,26 +124,36 @@ If you have Ruby 2.x or want a specific version of Puppet,
|
||||||
you must set an environment variable such as:
|
you must set an environment variable such as:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export PUPPET_VERSION="~> 5.5.6"
|
export PUPPET_GEM_VERSION="~> 6.1.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can install all needed gems for spec tests into the modules directory by
|
You can install all needed gems for spec tests into the modules directory by
|
||||||
running:
|
running:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bundle install --path .vendor/ --without development system_tests release --jobs "$(nproc)"
|
bundle config set --local path '.vendor/'
|
||||||
|
bundle config set --local without 'development system_tests release'
|
||||||
|
bundle install --jobs "$(nproc)"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you also want to run acceptance tests:
|
If you also want to run acceptance tests:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"
|
bundle config set --local path '.vendor/'
|
||||||
|
bundle config set --local without 'development release'
|
||||||
|
bundle config set --local with 'system_tests'
|
||||||
|
bundle install --jobs "$(nproc)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Our all in one solution if you don't know if you need to install or update gems:
|
Our all in one solution if you don't know if you need to install or update gems:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bundle install --path .vendor/ --with system_tests --without development release --jobs "$(nproc)"; bundle update; bundle clean
|
bundle config set --local path '.vendor/'
|
||||||
|
bundle config set --local without 'development release'
|
||||||
|
bundle config set --local with 'system_tests'
|
||||||
|
bundle install --jobs "$(nproc)"
|
||||||
|
bundle update
|
||||||
|
bundle clean
|
||||||
```
|
```
|
||||||
|
|
||||||
As an alternative to the `--jobs "$(nproc)` parameter, you can set an
|
As an alternative to the `--jobs "$(nproc)` parameter, you can set an
|
||||||
|
@ -232,51 +242,31 @@ simple tests against it after applying the module. You can run this
|
||||||
with:
|
with:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bundle exec rake beaker
|
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
|
||||||
```
|
```
|
||||||
|
|
||||||
This will run the tests on the module's default nodeset. You can override the
|
or
|
||||||
nodeset used, e.g.,
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
BEAKER_set=centos-7-x64 bundle exec rake beaker
|
BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker
|
||||||
```
|
```
|
||||||
|
|
||||||
There are default rake tasks for the various acceptance test modules, e.g.,
|
This latter example will use the distribution's own version of Puppet.
|
||||||
|
|
||||||
```sh
|
You can replace the string `debian11` with any common operating system.
|
||||||
bundle exec rake beaker:centos-7-x64
|
|
||||||
bundle exec rake beaker:ssh:centos-7-x64
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don't want to have to recreate the virtual machine every time you can
|
|
||||||
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
|
|
||||||
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
|
|
||||||
created virtual machines will be in `.vagrant/beaker_vagrant_files`.
|
|
||||||
|
|
||||||
Beaker also supports docker containers. We also use that in our automated CI
|
|
||||||
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
|
|
||||||
```
|
|
||||||
|
|
||||||
You can replace the string `debian10` with any common operating system.
|
|
||||||
The following strings are known to work:
|
The following strings are known to work:
|
||||||
|
|
||||||
* ubuntu1604
|
|
||||||
* ubuntu1804
|
|
||||||
* ubuntu2004
|
* ubuntu2004
|
||||||
* debian9
|
* ubuntu2204
|
||||||
* debian10
|
* debian11
|
||||||
* centos7
|
* debian12
|
||||||
* centos8
|
* centos9
|
||||||
|
* archlinux
|
||||||
|
* almalinux8
|
||||||
|
* almalinux9
|
||||||
|
* fedora36
|
||||||
|
|
||||||
The easiest way to debug in a docker container is to open a shell:
|
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
|
||||||
|
|
||||||
```sh
|
|
||||||
docker exec -it -u root ${container_id_or_name} bash
|
|
||||||
```
|
|
||||||
|
|
||||||
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
|
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
|
||||||
repository.
|
repository.
|
||||||
|
|
3
.github/SECURITY.md
vendored
3
.github/SECURITY.md
vendored
|
@ -1,3 +0,0 @@
|
||||||
# Vox Pupuli Security Policy
|
|
||||||
|
|
||||||
Our vulnerabilities reporting process is at https://voxpupuli.org/security/
|
|
6
.github/labeler.yml
vendored
Normal file
6
.github/labeler.yml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
skip-changelog:
|
||||||
|
- head-branch: ['^release-*', 'release']
|
42
.github/release.yml
vendored
Normal file
42
.github/release.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
exclude:
|
||||||
|
labels:
|
||||||
|
- duplicate
|
||||||
|
- invalid
|
||||||
|
- modulesync
|
||||||
|
- question
|
||||||
|
- skip-changelog
|
||||||
|
- wont-fix
|
||||||
|
- wontfix
|
||||||
|
|
||||||
|
categories:
|
||||||
|
- title: Breaking Changes 🛠
|
||||||
|
labels:
|
||||||
|
- backwards-incompatible
|
||||||
|
|
||||||
|
- title: New Features 🎉
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
|
||||||
|
- title: Bug Fixes 🐛
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
|
||||||
|
- title: Documentation Updates 📚
|
||||||
|
labels:
|
||||||
|
- documentation
|
||||||
|
- docs
|
||||||
|
|
||||||
|
- title: Dependency Updates ⬆️
|
||||||
|
labels:
|
||||||
|
- dependencies
|
||||||
|
|
||||||
|
- title: Other Changes
|
||||||
|
labels:
|
||||||
|
- "*"
|
89
.github/workflows/ci.yml
vendored
89
.github/workflows/ci.yml
vendored
|
@ -1,75 +1,22 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on: pull_request
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request: {}
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.ref_name }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup_matrix:
|
puppet:
|
||||||
name: 'Setup Test Matrix'
|
name: Puppet
|
||||||
runs-on: ubuntu-latest
|
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v3
|
||||||
outputs:
|
|
||||||
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
|
|
||||||
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
|
|
||||||
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
|
|
||||||
env:
|
|
||||||
BUNDLE_WITHOUT: development:test:release
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: '2.7'
|
|
||||||
bundler-cache: true
|
|
||||||
- name: Run rake validate
|
|
||||||
run: bundle exec rake validate
|
|
||||||
- name: Setup Test Matrix
|
|
||||||
id: get-outputs
|
|
||||||
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
|
|
||||||
|
|
||||||
unit:
|
|
||||||
needs: setup_matrix
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
|
|
||||||
env:
|
|
||||||
BUNDLE_WITHOUT: development:system_tests:release
|
|
||||||
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
|
|
||||||
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: ${{ matrix.ruby }}
|
|
||||||
bundler-cache: true
|
|
||||||
- name: Run tests
|
|
||||||
run: bundle exec rake
|
|
||||||
|
|
||||||
acceptance:
|
|
||||||
needs: setup_matrix
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
BUNDLE_WITHOUT: development:test:release
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
|
|
||||||
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
|
|
||||||
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
|
|
||||||
steps:
|
|
||||||
- name: Enable IPv6 on docker
|
|
||||||
run: |
|
|
||||||
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
|
|
||||||
sudo service docker restart
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
|
||||||
ruby-version: '2.7'
|
|
||||||
bundler-cache: true
|
|
||||||
- name: Run tests
|
|
||||||
run: bundle exec rake beaker
|
|
||||||
env:
|
|
||||||
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
|
|
||||||
BEAKER_setfile: ${{ matrix.setfile.value }}
|
|
||||||
|
|
18
.github/workflows/labeler.yml
vendored
Normal file
18
.github/workflows/labeler.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
name: "Pull Request Labeler"
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request_target: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
labeler:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v5
|
23
.github/workflows/prepare_release.yml
vendored
Normal file
23
.github/workflows/prepare_release.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
name: 'Prepare Release'
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release_prep:
|
||||||
|
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
|
||||||
|
with:
|
||||||
|
version: ${{ github.event.inputs.version }}
|
||||||
|
allowed_owner: 'voxpupuli'
|
||||||
|
secrets:
|
||||||
|
# Configure secrets here:
|
||||||
|
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
|
||||||
|
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'
|
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
@ -1,29 +1,23 @@
|
||||||
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
env:
|
|
||||||
BUNDLE_WITHOUT: development:test:system_tests
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
release:
|
||||||
name: 'deploy to forge'
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v3
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Setup Ruby
|
|
||||||
uses: ruby/setup-ruby@v1
|
|
||||||
with:
|
with:
|
||||||
ruby-version: '2.7'
|
allowed_owner: 'voxpupuli'
|
||||||
bundler-cache: true
|
secrets:
|
||||||
- name: Build and Deploy
|
|
||||||
env:
|
|
||||||
# Configure secrets here:
|
# Configure secrets here:
|
||||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
|
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
|
||||||
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
|
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
|
||||||
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
|
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
|
||||||
run: bundle exec rake module:push
|
|
||||||
|
|
41
.gitignore
vendored
41
.gitignore
vendored
|
@ -1,20 +1,25 @@
|
||||||
pkg/
|
# Managed by modulesync - DO NOT EDIT
|
||||||
Gemfile.lock
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
Gemfile.local
|
|
||||||
vendor/
|
/pkg/
|
||||||
.vendor/
|
/Gemfile.lock
|
||||||
spec/fixtures/manifests/
|
/Gemfile.local
|
||||||
spec/fixtures/modules/
|
/vendor/
|
||||||
.vagrant/
|
/.vendor/
|
||||||
.bundle/
|
/spec/fixtures/manifests/
|
||||||
.ruby-version
|
/spec/fixtures/modules/
|
||||||
coverage/
|
/.vagrant/
|
||||||
log/
|
/.bundle/
|
||||||
.idea/
|
/.ruby-version
|
||||||
.dependencies/
|
/coverage/
|
||||||
.librarian/
|
/log/
|
||||||
Puppetfile.lock
|
/.idea/
|
||||||
|
/.dependencies/
|
||||||
|
/.librarian/
|
||||||
|
/Puppetfile.lock
|
||||||
*.iml
|
*.iml
|
||||||
.*.sw?
|
.*.sw?
|
||||||
.yardoc/
|
/.yardoc/
|
||||||
Guardfile
|
/Guardfile
|
||||||
|
bolt-debug.log
|
||||||
|
.rerun.json
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
---
|
---
|
||||||
modulesync_config_version: '4.0.0'
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
modulesync_config_version: '9.5.0'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Managed by https://github.com/voxpupuli/modulesync_configs
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
#
|
#
|
||||||
# Hooks are only enabled if you take action.
|
# Hooks are only enabled if you take action.
|
||||||
#
|
#
|
||||||
|
@ -42,10 +43,12 @@ PreCommit:
|
||||||
enabled: true
|
enabled: true
|
||||||
description: 'Runs rubocop on modified files only'
|
description: 'Runs rubocop on modified files only'
|
||||||
command: ['bundle', 'exec', 'rubocop']
|
command: ['bundle', 'exec', 'rubocop']
|
||||||
PuppetLint:
|
RakeTarget:
|
||||||
enabled: true
|
enabled: true
|
||||||
description: 'Runs puppet-lint on modified files only'
|
description: 'Runs lint on modified files only'
|
||||||
command: ['bundle', 'exec', 'puppet-lint']
|
targets:
|
||||||
|
- 'lint'
|
||||||
|
command: ['bundle', 'exec', 'rake']
|
||||||
YamlSyntax:
|
YamlSyntax:
|
||||||
enabled: true
|
enabled: true
|
||||||
JsonSyntax:
|
JsonSyntax:
|
||||||
|
|
69
.pmtignore
69
.pmtignore
|
@ -1,34 +1,39 @@
|
||||||
docs/
|
# Managed by modulesync - DO NOT EDIT
|
||||||
pkg/
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
Gemfile
|
|
||||||
Gemfile.lock
|
/docs/
|
||||||
Gemfile.local
|
/pkg/
|
||||||
vendor/
|
/Gemfile
|
||||||
.vendor/
|
/Gemfile.lock
|
||||||
spec/
|
/Gemfile.local
|
||||||
Rakefile
|
/vendor/
|
||||||
.vagrant/
|
/.vendor/
|
||||||
.bundle/
|
/spec/
|
||||||
.ruby-version
|
/Rakefile
|
||||||
coverage/
|
/.vagrant/
|
||||||
log/
|
/.bundle/
|
||||||
.idea/
|
/.ruby-version
|
||||||
.dependencies/
|
/coverage/
|
||||||
.github/
|
/log/
|
||||||
.librarian/
|
/.idea/
|
||||||
Puppetfile.lock
|
/.dependencies/
|
||||||
|
/.github/
|
||||||
|
/.librarian/
|
||||||
|
/Puppetfile.lock
|
||||||
|
/Puppetfile
|
||||||
*.iml
|
*.iml
|
||||||
.editorconfig
|
/.editorconfig
|
||||||
.fixtures.yml
|
/.fixtures.yml
|
||||||
.gitignore
|
/.gitignore
|
||||||
.msync.yml
|
/.msync.yml
|
||||||
.overcommit.yml
|
/.overcommit.yml
|
||||||
.pmtignore
|
/.pmtignore
|
||||||
.rspec
|
/.rspec
|
||||||
.rspec_parallel
|
/.rspec_parallel
|
||||||
.rubocop.yml
|
/.rubocop.yml
|
||||||
.sync.yml
|
/.sync.yml
|
||||||
.*.sw?
|
.*.sw?
|
||||||
.yardoc/
|
/.yardoc/
|
||||||
.yardopts
|
/.yardopts
|
||||||
Dockerfile
|
/Dockerfile
|
||||||
|
/HISTORY.md
|
||||||
|
|
4
.puppet-lint.rc
Normal file
4
.puppet-lint.rc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
--fail-on-warnings
|
2
.rspec
2
.rspec
|
@ -1,2 +0,0 @@
|
||||||
--format documentation
|
|
||||||
--color
|
|
|
@ -1 +0,0 @@
|
||||||
--format progress
|
|
|
@ -1,3 +1,6 @@
|
||||||
---
|
---
|
||||||
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
inherit_gem:
|
inherit_gem:
|
||||||
voxpupuli-test: rubocop.yml
|
voxpupuli-test: rubocop.yml
|
||||||
|
|
5
.sync.yml
Normal file
5
.sync.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
.puppet-lint.rc:
|
||||||
|
enabled_lint_checks:
|
||||||
|
- parameter_documentation
|
||||||
|
- parameter_types
|
|
@ -1,2 +0,0 @@
|
||||||
--markup markdown
|
|
||||||
--output-dir docs/
|
|
94
CHANGELOG.md
94
CHANGELOG.md
|
@ -4,14 +4,102 @@ All notable changes to this project will be documented in this file.
|
||||||
Each new release typically also includes the latest modulesync defaults.
|
Each new release typically also includes the latest modulesync defaults.
|
||||||
These should not affect the functionality of the module.
|
These should not affect the functionality of the module.
|
||||||
|
|
||||||
## [v1.0.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v1.0.0) (2021-01-16)
|
## [v3.3.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.3.0) (2025-02-11)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/d9ceffd75b1f222e1145d58cceaf3a9bcb41b360...v1.0.0)
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.2.0...v3.3.0)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Add Ubuntu 24.04 support [\#47](https://github.com/voxpupuli/puppet-hashi_stack/pull/47) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- puppetlabs/apt: Allow 10.x [\#45](https://github.com/voxpupuli/puppet-hashi_stack/pull/45) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
## [v3.2.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.2.0) (2024-03-24)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.1.0...v3.2.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Add support for AArch64/ARM64 binaries [\#36](https://github.com/voxpupuli/puppet-hashi_stack/pull/36) ([rgrizzell](https://github.com/rgrizzell))
|
||||||
|
|
||||||
|
## [v3.1.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.1.0) (2023-11-19)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v3.0.0...v3.1.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Add Debian 12 support [\#34](https://github.com/voxpupuli/puppet-hashi_stack/pull/34) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
## [v3.0.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v3.0.0) (2023-08-19)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.2.0...v3.0.0)
|
||||||
|
|
||||||
|
**Breaking changes:**
|
||||||
|
|
||||||
|
- Drop Puppet 6 support [\#28](https://github.com/voxpupuli/puppet-hashi_stack/pull/28) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Add Ubuntu 22.04 support [\#32](https://github.com/voxpupuli/puppet-hashi_stack/pull/32) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Add Debian 11 support [\#31](https://github.com/voxpupuli/puppet-hashi_stack/pull/31) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Add EL9 support [\#30](https://github.com/voxpupuli/puppet-hashi_stack/pull/30) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Add AlmaLinux/Rocky/OracleLinux support [\#29](https://github.com/voxpupuli/puppet-hashi_stack/pull/29) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Add Puppet 8 support [\#27](https://github.com/voxpupuli/puppet-hashi_stack/pull/27) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- puppetlabs/stdlib: Allow 9.x [\#26](https://github.com/voxpupuli/puppet-hashi_stack/pull/26) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
## [v2.2.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.2.0) (2023-01-27)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.1.0...v2.2.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- add toggle for enabling yum repo [\#21](https://github.com/voxpupuli/puppet-hashi_stack/pull/21) ([wimkorevaar](https://github.com/wimkorevaar))
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- use new gpg key [\#22](https://github.com/voxpupuli/puppet-hashi_stack/pull/22) ([BDelacour](https://github.com/BDelacour))
|
||||||
|
|
||||||
|
## [v2.1.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.1.0) (2022-08-28)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.0.1...v2.1.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Add support for repo\_gpgcheck to the hashicorp yum repo [\#15](https://github.com/voxpupuli/puppet-hashi_stack/pull/15) ([hammondr](https://github.com/hammondr))
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- puppetlabs/apt: Allow 9.x [\#17](https://github.com/voxpupuli/puppet-hashi_stack/pull/17) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
- Fix Ubuntu18/puppet6 CI job [\#16](https://github.com/voxpupuli/puppet-hashi_stack/pull/16) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
## [v2.0.1](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.0.1) (2021-08-27)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v2.0.0...v2.0.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Release 2.0.1 [\#10](https://github.com/voxpupuli/puppet-hashi_stack/pull/10) ([smortex](https://github.com/smortex))
|
||||||
|
- Allow stdlib 8.0.0 [\#8](https://github.com/voxpupuli/puppet-hashi_stack/pull/8) ([smortex](https://github.com/smortex))
|
||||||
|
|
||||||
|
## [v2.0.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v2.0.0) (2021-05-11)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/v1.0.0...v2.0.0)
|
||||||
|
|
||||||
|
**Breaking changes:**
|
||||||
|
|
||||||
|
- Drop EoL Debian, adjust deps for Puppet 6 & 7 [\#6](https://github.com/voxpupuli/puppet-hashi_stack/pull/6) ([genebean](https://github.com/genebean))
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
|
- Allow customising the base URL of the Yum repository [\#5](https://github.com/voxpupuli/puppet-hashi_stack/pull/5) ([nbarrientos](https://github.com/nbarrientos))
|
||||||
|
- Enable Puppet 7 support/testing [\#4](https://github.com/voxpupuli/puppet-hashi_stack/pull/4) ([bastelfreak](https://github.com/bastelfreak))
|
||||||
|
|
||||||
|
## [v1.0.0](https://github.com/voxpupuli/puppet-hashi_stack/tree/v1.0.0) (2021-01-17)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/voxpupuli/puppet-hashi_stack/compare/d9ceffd75b1f222e1145d58cceaf3a9bcb41b360...v1.0.0)
|
||||||
|
|
||||||
|
**Implemented enhancements:**
|
||||||
|
|
||||||
- moving parameters into appropriate place, adding meaning unit test, f… [\#2](https://github.com/voxpupuli/puppet-hashi_stack/pull/2) ([attachmentgenie](https://github.com/attachmentgenie))
|
- moving parameters into appropriate place, adding meaning unit test, f… [\#2](https://github.com/voxpupuli/puppet-hashi_stack/pull/2) ([attachmentgenie](https://github.com/attachmentgenie))
|
||||||
- modulesync 4.0.0-10-g1c946c3 [\#1](https://github.com/voxpupuli/puppet-hashi_stack/pull/1) ([attachmentgenie](https://github.com/attachmentgenie))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
21
Dockerfile
21
Dockerfile
|
@ -1,21 +0,0 @@
|
||||||
FROM ruby:2.5.3
|
|
||||||
|
|
||||||
WORKDIR /opt/puppet
|
|
||||||
|
|
||||||
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
|
|
||||||
RUN mkdir -p /etc/sv
|
|
||||||
|
|
||||||
ARG PUPPET_VERSION="~> 6.0"
|
|
||||||
ARG PARALLEL_TEST_PROCESSORS=4
|
|
||||||
|
|
||||||
# Cache gems
|
|
||||||
COPY Gemfile .
|
|
||||||
RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle}
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN bundle install
|
|
||||||
RUN bundle exec rake release_checks
|
|
||||||
|
|
||||||
# Container should not saved
|
|
||||||
RUN exit 1
|
|
19
Gemfile
19
Gemfile
|
@ -1,9 +1,13 @@
|
||||||
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'voxpupuli-test', '~> 2.1', :require => false
|
gem 'voxpupuli-test', '~> 9.0', :require => false
|
||||||
gem 'coveralls', :require => false
|
gem 'coveralls', :require => false
|
||||||
gem 'simplecov-console', :require => false
|
gem 'simplecov-console', :require => false
|
||||||
|
gem 'puppet_metadata', '~> 5.0', :require => false
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
@ -12,22 +16,17 @@ group :development do
|
||||||
end
|
end
|
||||||
|
|
||||||
group :system_tests do
|
group :system_tests do
|
||||||
gem 'puppet_metadata', '~> 0.3.0', :require => false
|
gem 'voxpupuli-acceptance', '~> 3.5', :require => false
|
||||||
gem 'voxpupuli-acceptance', :require => false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :release do
|
group :release do
|
||||||
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
|
gem 'voxpupuli-release', '~> 3.0', :require => false
|
||||||
gem 'puppet-blacksmith', :require => false
|
|
||||||
gem 'voxpupuli-release', :require => false
|
|
||||||
gem 'puppet-strings', '>= 2.2', :require => false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
|
|
||||||
gem 'rake', :require => false
|
gem 'rake', :require => false
|
||||||
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
|
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
|
||||||
|
|
||||||
puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
|
puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"]
|
||||||
gem 'puppet', puppetversion, :require => false, :groups => [:test]
|
gem 'puppet', puppetversion, :require => false, :groups => [:test]
|
||||||
|
|
||||||
# vim: syntax=ruby
|
# vim: syntax=ruby
|
||||||
|
|
53
REFERENCE.md
53
REFERENCE.md
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
### Classes
|
### Classes
|
||||||
|
|
||||||
* [`hashi_stack::repo`](#hashi_stackrepo): Set up the package repository for the HashiCorp Stack components
|
* [`hashi_stack::repo`](#hashi_stack--repo): Set up the package repository for the HashiCorp Stack components
|
||||||
|
|
||||||
## Classes
|
## Classes
|
||||||
|
|
||||||
### `hashi_stack::repo`
|
### <a name="hashi_stack--repo"></a>`hashi_stack::repo`
|
||||||
|
|
||||||
This class installs the hashicorp repository
|
This class installs the hashicorp repository
|
||||||
|
|
||||||
|
@ -34,17 +34,26 @@ package { 'packer':
|
||||||
|
|
||||||
#### Parameters
|
#### Parameters
|
||||||
|
|
||||||
The following parameters are available in the `hashi_stack::repo` class.
|
The following parameters are available in the `hashi_stack::repo` class:
|
||||||
|
|
||||||
##### `priority`
|
* [`priority`](#-hashi_stack--repo--priority)
|
||||||
|
* [`proxy`](#-hashi_stack--repo--proxy)
|
||||||
|
* [`key_id`](#-hashi_stack--repo--key_id)
|
||||||
|
* [`key_source`](#-hashi_stack--repo--key_source)
|
||||||
|
* [`description`](#-hashi_stack--repo--description)
|
||||||
|
* [`rpm_base`](#-hashi_stack--repo--rpm_base)
|
||||||
|
* [`repo_gpgcheck`](#-hashi_stack--repo--repo_gpgcheck)
|
||||||
|
* [`repo_enabled`](#-hashi_stack--repo--repo_enabled)
|
||||||
|
|
||||||
|
##### <a name="-hashi_stack--repo--priority"></a>`priority`
|
||||||
|
|
||||||
Data type: `Optional[Integer]`
|
Data type: `Optional[Integer]`
|
||||||
|
|
||||||
A numeric priority for the repo, passed to the package management system
|
A numeric priority for the repo, passed to the package management system
|
||||||
|
|
||||||
Default value: ``undef``
|
Default value: `undef`
|
||||||
|
|
||||||
##### `proxy`
|
##### <a name="-hashi_stack--repo--proxy"></a>`proxy`
|
||||||
|
|
||||||
Data type: `String`
|
Data type: `String`
|
||||||
|
|
||||||
|
@ -52,15 +61,15 @@ The URL of a HTTP proxy to use for package downloads (YUM only)
|
||||||
|
|
||||||
Default value: `'absent'`
|
Default value: `'absent'`
|
||||||
|
|
||||||
##### `key_id`
|
##### <a name="-hashi_stack--repo--key_id"></a>`key_id`
|
||||||
|
|
||||||
Data type: `String`
|
Data type: `String`
|
||||||
|
|
||||||
GPG key to authenticate Apt package signatures.
|
GPG key to authenticate Apt package signatures.
|
||||||
|
|
||||||
Default value: `'E8A032E094D8EB4EA189D270DA418C88A3219F7B'`
|
Default value: `'798AEC654E5C15428C8E42EEAA16FCBCA621E701'`
|
||||||
|
|
||||||
##### `key_source`
|
##### <a name="-hashi_stack--repo--key_source"></a>`key_source`
|
||||||
|
|
||||||
Data type: `Stdlib::HTTPSUrl`
|
Data type: `Stdlib::HTTPSUrl`
|
||||||
|
|
||||||
|
@ -68,7 +77,7 @@ The location of an existing GPG key file to copy.
|
||||||
|
|
||||||
Default value: `'https://apt.releases.hashicorp.com/gpg'`
|
Default value: `'https://apt.releases.hashicorp.com/gpg'`
|
||||||
|
|
||||||
##### `description`
|
##### <a name="-hashi_stack--repo--description"></a>`description`
|
||||||
|
|
||||||
Data type: `String`
|
Data type: `String`
|
||||||
|
|
||||||
|
@ -76,3 +85,27 @@ Repository description
|
||||||
|
|
||||||
Default value: `'HashiCorp package repository.'`
|
Default value: `'HashiCorp package repository.'`
|
||||||
|
|
||||||
|
##### <a name="-hashi_stack--repo--rpm_base"></a>`rpm_base`
|
||||||
|
|
||||||
|
Data type: `String`
|
||||||
|
|
||||||
|
Base URL for the Yum repository
|
||||||
|
|
||||||
|
Default value: `'https://rpm.releases.hashicorp.com'`
|
||||||
|
|
||||||
|
##### <a name="-hashi_stack--repo--repo_gpgcheck"></a>`repo_gpgcheck`
|
||||||
|
|
||||||
|
Data type: `Integer[0,1]`
|
||||||
|
|
||||||
|
enables gpg validation of packages from the repo
|
||||||
|
|
||||||
|
Default value: `0`
|
||||||
|
|
||||||
|
##### <a name="-hashi_stack--repo--repo_enabled"></a>`repo_enabled`
|
||||||
|
|
||||||
|
Data type: `Integer[0,1]`
|
||||||
|
|
||||||
|
enables/disables the repository
|
||||||
|
|
||||||
|
Default value: `1`
|
||||||
|
|
||||||
|
|
53
Rakefile
53
Rakefile
|
@ -1,9 +1,22 @@
|
||||||
# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper),
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
|
# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper),
|
||||||
# otherwise attempt to load it directly.
|
# otherwise attempt to load it directly.
|
||||||
begin
|
begin
|
||||||
require 'voxpupuli/test/rake'
|
require 'voxpupuli/test/rake'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
begin
|
||||||
require 'puppetlabs_spec_helper/rake_tasks'
|
require 'puppetlabs_spec_helper/rake_tasks'
|
||||||
|
rescue LoadError
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# load optional tasks for acceptance
|
||||||
|
# only available if gem group releases is installed
|
||||||
|
begin
|
||||||
|
require 'voxpupuli/acceptance/rake'
|
||||||
|
rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
# load optional tasks for releases
|
# load optional tasks for releases
|
||||||
|
@ -11,6 +24,10 @@ end
|
||||||
begin
|
begin
|
||||||
require 'voxpupuli/release/rake_tasks'
|
require 'voxpupuli/release/rake_tasks'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
# voxpupuli-release not present
|
||||||
|
else
|
||||||
|
GCGConfig.user = 'voxpupuli'
|
||||||
|
GCGConfig.project = 'puppet-hashi_stack'
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run main 'test' task and report merged results to coveralls"
|
desc "Run main 'test' task and report merged results to coveralls"
|
||||||
|
@ -24,38 +41,4 @@ task test_with_coveralls: [:test] do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Generate REFERENCE.md'
|
|
||||||
task :reference, [:debug, :backtrace] do |t, args|
|
|
||||||
patterns = ''
|
|
||||||
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
|
|
||||||
end
|
|
||||||
|
|
||||||
begin
|
|
||||||
require 'github_changelog_generator/task'
|
|
||||||
require 'puppet_blacksmith'
|
|
||||||
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
||||||
version = (Blacksmith::Modulefile.new).version
|
|
||||||
config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/
|
|
||||||
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
|
|
||||||
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
|
|
||||||
config.user = 'voxpupuli'
|
|
||||||
metadata_json = File.join(File.dirname(__FILE__), 'metadata.json')
|
|
||||||
metadata = JSON.load(File.read(metadata_json))
|
|
||||||
config.project = metadata['name']
|
|
||||||
end
|
|
||||||
|
|
||||||
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
|
|
||||||
require 'rbconfig'
|
|
||||||
if RbConfig::CONFIG['host_os'] =~ /linux/
|
|
||||||
task :changelog do
|
|
||||||
puts 'Fixing line endings...'
|
|
||||||
changelog_file = File.join(__dir__, 'CHANGELOG.md')
|
|
||||||
changelog_txt = File.read(changelog_file)
|
|
||||||
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
|
|
||||||
File.open(changelog_file, "w") {|file| file.puts new_contents }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
rescue LoadError
|
|
||||||
end
|
|
||||||
# vim: syntax=ruby
|
# vim: syntax=ruby
|
||||||
|
|
|
@ -17,20 +17,32 @@
|
||||||
# @param key_id GPG key to authenticate Apt package signatures.
|
# @param key_id GPG key to authenticate Apt package signatures.
|
||||||
# @param key_source The location of an existing GPG key file to copy.
|
# @param key_source The location of an existing GPG key file to copy.
|
||||||
# @param description Repository description
|
# @param description Repository description
|
||||||
|
# @param rpm_base Base URL for the Yum repository
|
||||||
|
# @param repo_gpgcheck enables gpg validation of packages from the repo
|
||||||
|
# @param repo_enabled enables/disables the repository
|
||||||
|
#
|
||||||
class hashi_stack::repo (
|
class hashi_stack::repo (
|
||||||
Optional[Integer] $priority = undef,
|
Optional[Integer] $priority = undef,
|
||||||
String $proxy = 'absent',
|
String $proxy = 'absent',
|
||||||
String $key_id = 'E8A032E094D8EB4EA189D270DA418C88A3219F7B',
|
String $key_id = '798AEC654E5C15428C8E42EEAA16FCBCA621E701',
|
||||||
Stdlib::HTTPSUrl $key_source = 'https://apt.releases.hashicorp.com/gpg',
|
Stdlib::HTTPSUrl $key_source = 'https://apt.releases.hashicorp.com/gpg',
|
||||||
String $description = 'HashiCorp package repository.',
|
String $description = 'HashiCorp package repository.',
|
||||||
|
String $rpm_base = 'https://rpm.releases.hashicorp.com',
|
||||||
|
Integer[0,1] $repo_gpgcheck = 0,
|
||||||
|
Integer[0,1] $repo_enabled = 1,
|
||||||
) {
|
) {
|
||||||
|
$arch = $facts['os']['architecture'] ? {
|
||||||
|
'aarch64' => 'arm64', # 'aarch64' is official, but Hashicorp uses 'arm64'
|
||||||
|
default => $facts['os']['architecture'],
|
||||||
|
}
|
||||||
|
|
||||||
case $facts['os']['family'] {
|
case $facts['os']['family'] {
|
||||||
'Debian': {
|
'Debian': {
|
||||||
include apt
|
include apt
|
||||||
|
|
||||||
apt::source { 'HashiCorp':
|
apt::source { 'HashiCorp':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
architecture => 'amd64',
|
architecture => $arch,
|
||||||
comment => $description,
|
comment => $description,
|
||||||
location => 'https://apt.releases.hashicorp.com',
|
location => 'https://apt.releases.hashicorp.com',
|
||||||
repos => 'main',
|
repos => 'main',
|
||||||
|
@ -48,10 +60,11 @@ class hashi_stack::repo (
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
yumrepo { 'HashiCorp':
|
yumrepo { 'HashiCorp':
|
||||||
descr => $description,
|
descr => $description,
|
||||||
baseurl => 'https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable',
|
baseurl => "${rpm_base}/RHEL/\$releasever/\$basearch/stable",
|
||||||
gpgcheck => 1,
|
gpgcheck => 1,
|
||||||
gpgkey => $key_source,
|
gpgkey => $key_source,
|
||||||
enabled => 1,
|
repo_gpgcheck => $repo_gpgcheck,
|
||||||
|
enabled => $repo_enabled,
|
||||||
proxy => $proxy,
|
proxy => $proxy,
|
||||||
priority => $priority,
|
priority => $priority,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,20 @@
|
||||||
{
|
{
|
||||||
"name": "puppet-hashi_stack",
|
"name": "puppet-hashi_stack",
|
||||||
"version": "1.0.0",
|
"version": "3.3.1-rc0",
|
||||||
"author": "Vox Pupuli",
|
"author": "Vox Pupuli",
|
||||||
"summary": "This module contains shared code for various HashiCorp modules",
|
"summary": "This module contains shared code for various HashiCorp modules",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"source": "https://github.com/voxpupuli/puppet-hashi_stack",
|
"source": "https://github.com/voxpupuli/puppet-hashi_stack",
|
||||||
"project_page": "https://github.com/voxpupuli/puppet-hashi_stack",
|
"project_page": "https://github.com/voxpupuli/puppet-hashi_stack",
|
||||||
"issues_url": "https://github.com/voxpupuli/puppet-hashi_stack/issues",
|
"issues_url": "https://github.com/voxpupuli/puppet-hashi_stack/issues",
|
||||||
"description": "This module contains shared code for various HashiCorp modules",
|
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "puppetlabs-stdlib",
|
"name": "puppetlabs-stdlib",
|
||||||
"version_requirement": ">= 4.13.1 < 7.0.0"
|
"version_requirement": ">= 5.1.0 < 10.0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "puppetlabs/apt",
|
"name": "puppetlabs/apt",
|
||||||
"version_requirement": ">= 2.0.0 < 8.0.0"
|
"version_requirement": ">= 6.1.0 < 11.0.0"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "puppet/yum",
|
|
||||||
"version_requirement": ">= 0.9.6 < 5.0.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "puppetlabs/yumrepo_core",
|
|
||||||
"version_requirement": ">= 1.0.0 < 2.0.0"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"operatingsystem_support": [
|
"operatingsystem_support": [
|
||||||
|
@ -31,35 +22,65 @@
|
||||||
"operatingsystem": "RedHat",
|
"operatingsystem": "RedHat",
|
||||||
"operatingsystemrelease": [
|
"operatingsystemrelease": [
|
||||||
"7",
|
"7",
|
||||||
"8"
|
"8",
|
||||||
|
"9"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "OracleLinux",
|
||||||
|
"operatingsystemrelease": [
|
||||||
|
"8",
|
||||||
|
"9"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "AlmaLinux",
|
||||||
|
"operatingsystemrelease": [
|
||||||
|
"8",
|
||||||
|
"9"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "Rocky",
|
||||||
|
"operatingsystemrelease": [
|
||||||
|
"8",
|
||||||
|
"9"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "CentOS",
|
"operatingsystem": "CentOS",
|
||||||
"operatingsystemrelease": [
|
"operatingsystemrelease": [
|
||||||
"7",
|
"7",
|
||||||
"8"
|
"8",
|
||||||
|
"9"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "Debian",
|
"operatingsystem": "Debian",
|
||||||
"operatingsystemrelease": [
|
"operatingsystemrelease": [
|
||||||
"9",
|
"10",
|
||||||
"10"
|
"11",
|
||||||
|
"12"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "Ubuntu",
|
"operatingsystem": "Ubuntu",
|
||||||
"operatingsystemrelease": [
|
"operatingsystemrelease": [
|
||||||
"18.04",
|
"18.04",
|
||||||
"20.04"
|
"20.04",
|
||||||
|
"22.04",
|
||||||
|
"24.04"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
"name": "puppet",
|
"name": "puppet",
|
||||||
"version_requirement": ">= 6.1.0 < 7.0.0"
|
"version_requirement": ">= 7.0.0 < 9.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "openvox",
|
||||||
|
"version_requirement": ">= 7.0.0 < 9.0.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper_acceptance'
|
require 'spec_helper_acceptance'
|
||||||
|
|
||||||
describe 'hashi_stack::repo class' do
|
describe 'hashi_stack::repo class' do
|
||||||
|
|
||||||
context 'default parameters' do
|
context 'default parameters' do
|
||||||
# Using puppet_apply as a helper
|
# Using puppet_apply as a helper
|
||||||
it 'should work with no errors based on the example' do
|
it 'works with no errors based on the example' do
|
||||||
pp = <<-EOS
|
pp = <<-EOS
|
||||||
include hashi_stack::repo
|
include hashi_stack::repo
|
||||||
package { 'packer':
|
package { 'packer':
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'hashi_stack::repo' do
|
describe 'hashi_stack::repo' do
|
||||||
|
@ -5,11 +7,31 @@ describe 'hashi_stack::repo' do
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let(:facts) { os_facts }
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
|
||||||
case os_facts[:os]['family']
|
case os_facts[:os]['family']
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
it { is_expected.to contain_apt__source('HashiCorp') }
|
it { is_expected.to contain_apt__source('HashiCorp') }
|
||||||
when 'RedHat'
|
when 'RedHat'
|
||||||
it { is_expected.to contain_yumrepo('HashiCorp') }
|
it {
|
||||||
|
expect(subject).to contain_yumrepo('HashiCorp').with(
|
||||||
|
baseurl: 'https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
context 'with custom Yum base url' do
|
||||||
|
let(:params) do
|
||||||
|
{
|
||||||
|
rpm_base: 'https://somewhere.else'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it {
|
||||||
|
expect(subject).to contain_yumrepo('HashiCorp').with(
|
||||||
|
baseurl: 'https://somewhere.else/RHEL/$releasever/$basearch/stable'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
6
spec/setup_acceptance_node.pp
Normal file
6
spec/setup_acceptance_node.pp
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Needed for os.distro.codebase fact on ubuntu 18 on puppet 6
|
||||||
|
if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['full'] == '18.04' and versioncmp($facts['puppetversion'], '7') <= 0 {
|
||||||
|
package{'lsb-release':
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,24 @@
|
||||||
# This file is managed via modulesync
|
# frozen_string_literal: true
|
||||||
# https://github.com/voxpupuli/modulesync
|
|
||||||
# https://github.com/voxpupuli/modulesync_config
|
# Managed by modulesync - DO NOT EDIT
|
||||||
|
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
|
||||||
|
|
||||||
# puppetlabs_spec_helper will set up coverage if the env variable is set.
|
# puppetlabs_spec_helper will set up coverage if the env variable is set.
|
||||||
# We want to do this if lib exists and it hasn't been explicitly set.
|
# We want to do this if lib exists and it hasn't been explicitly set.
|
||||||
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))
|
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
|
||||||
|
|
||||||
require 'voxpupuli/test/spec_helper'
|
require 'voxpupuli/test/spec_helper'
|
||||||
|
|
||||||
|
RSpec.configure do |c|
|
||||||
|
c.facterdb_string_keys = false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_mocked_facts!
|
||||||
|
|
||||||
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
|
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
|
||||||
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
|
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
|
||||||
if facts
|
facts&.each do |name, value|
|
||||||
facts.each do |name, value|
|
|
||||||
add_custom_fact name.to_sym, value
|
add_custom_fact name.to_sym, value
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# This file is completely managed via modulesync
|
# This file is completely managed via modulesync
|
||||||
require 'voxpupuli/acceptance/spec_helper_acceptance'
|
require 'voxpupuli/acceptance/spec_helper_acceptance'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue