1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fixtures:
mcollective: https://github.com/choria-io/puppet-mcollective.git
choria: https://github.com/choria-io/puppet-choria.git
apt: https://github.com/puppetlabs/puppetlabs-apt.git
systemd: https://github.com/voxpupuli/puppet-systemd.git
cron_core: https://github.com/puppetlabs/puppetlabs-cron_core.git
yumrepo_core: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
forge_modules:
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ By participating in this project you agree to abide by its terms.

* Fork the repo.
* Create a separate branch for your change.
* We only take pull requests with passing tests, and documentation. GitHub Actions run the tests for us (check the .github/workflows/ directory). 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.
* 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.
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 40
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 }}
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
env:
BUNDLE_WITHOUT: development:system_tests:release
steps:
Expand Down Expand Up @@ -62,8 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- uses: actions/checkout@v2
Expand All @@ -77,3 +75,12 @@ jobs:
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}

tests:
needs:
- unit
- acceptance
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '4.1.0'
modulesync_config_version: '4.2.0'
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v10.1.1](https://github.com/voxpupuli/puppet-r10k/tree/v10.1.1) (2021-08-27)

[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v10.1.0...v10.1.1)

**Fixed bugs:**

- Manage unit file via systemd::unit\_file [\#566](https://github.com/voxpupuli/puppet-r10k/pull/566) ([bastelfreak](https://github.com/bastelfreak))
- Remove explicit StandardOutput from webhook.service [\#564](https://github.com/voxpupuli/puppet-r10k/pull/564) ([kenyon](https://github.com/kenyon))

**Merged pull requests:**

- Allow up-to-date dependencies [\#567](https://github.com/voxpupuli/puppet-r10k/pull/567) ([smortex](https://github.com/smortex))

## [v10.1.0](https://github.com/voxpupuli/puppet-r10k/tree/v10.1.0) (2021-08-03)

[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v10.0.0...v10.1.0)
Expand Down
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :test do
gem 'voxpupuli-test', '~> 2.1', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 0.3.0', :require => false
gem 'voxpupuli-test', '~> 2.5', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 1.0', :require => false
end

group :development do
Expand All @@ -20,7 +20,7 @@ group :system_tests do
end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.0.2', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end
Expand Down
2 changes: 0 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,10 @@

if $facts['os']['family'] == 'Gentoo' {
$webhook_service_file = '/etc/init.d/webhook'
$webhook_service_template = 'webhook.init.gentoo.erb'
$webhook_service_file_mode = '0755'
$webhook_background = true
} else {
$webhook_service_file = '/etc/systemd/system/webhook.service'
$webhook_service_template = 'webhook.service.erb'
$webhook_service_file_mode = '0644'
$webhook_background = false
}
Expand Down
28 changes: 11 additions & 17 deletions manifests/webhook.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$group = $r10k::params::webhook_group,
$background = $r10k::params::webhook_background,
$bin_template = $r10k::params::webhook_bin_template,
$service_template = $r10k::params::webhook_service_template,
$service_template = 'webhook.service.epp',
$service_file = $r10k::params::webhook_service_file,
$service_file_mode = $r10k::params::webhook_service_file_mode,
$use_mcollective = $r10k::params::webhook_use_mcollective,
Expand Down Expand Up @@ -48,43 +48,37 @@
ensure => $ensure_file,
owner => $user,
group => $group,
before => Service['webhook'],
before => Service['webhook.service'],
}

file { '/var/log/webhook':
ensure => $ensure_directory,
owner => $user,
group => $group,
force => $ensure,
before => Service['webhook'],
before => Service['webhook.service'],
}

file { '/var/run/webhook':
ensure => $ensure_directory,
owner => $user,
group => $group,
before => Service['webhook'],
}

file { 'webhook_init_script':
ensure => $ensure_file,
content => template("r10k/${service_template}"),
path => $service_file,
mode => $service_file_mode,
notify => Service['webhook'],
before => Service['webhook.service'],
}

file { 'webhook_bin':
ensure => $ensure_file,
content => template($bin_template),
path => '/usr/local/bin/webhook',
mode => '0755',
notify => Service['webhook'],
notify => Service['webhook.service'],
}

service { 'webhook':
ensure => $ensure_service,
enable => $ensure,
systemd::unit_file { 'webhook.service':
ensure => $ensure_file,
content => epp("${module_name}/${service_template}", { 'user' => $user }),
enable => $ensure,
active => $ensure,
}

# We don't remove the packages/ gem as
Expand All @@ -106,7 +100,7 @@
group => 'peadmin',
mode => '0644',
content => file("${r10k::params::puppetconf_path}/ssl/certs/pe-internal-peadmin-mcollective-client.pem",'/dev/null'),
notify => Service['webhook'],
notify => Service['webhook.service'],
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/webhook/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
mode => $configfile_mode,
path => $configfile,
content => template($yaml_template),
notify => Service['webhook'],
notify => Service['webhook.service'],
}

if $manage_symlink {
Expand Down
6 changes: 3 additions & 3 deletions manifests/webhook/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package { 'sinatra':
ensure => $sinatra_version,
provider => $provider,
notify => Service['webhook'],
notify => Service['webhook.service'],
}
}

Expand All @@ -19,15 +19,15 @@
package { 'webrick':
ensure => $webrick_version,
provider => $provider,
notify => Service['webhook'],
notify => Service['webhook.service'],
}
}

if !defined(Package['json']) {
package { 'json':
ensure => installed,
provider => $provider,
notify => Service['webhook'],
notify => Service['webhook.service'],
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Vox Pupuli",
"license": "Apache-2.0",
"name": "puppet-r10k",
"version": "10.1.0",
"version": "10.1.1",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
Expand Down Expand Up @@ -53,7 +53,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.19.0 < 8.0.0"
"version_requirement": ">= 4.19.0 < 9.0.0"
},
{
"name": "puppetlabs/inifile",
Expand All @@ -66,6 +66,10 @@
{
"name": "choria/mcollective",
"version_requirement": ">= 0.10.0 <1.0.0"
},
{
"name": "puppet/systemd",
"version_requirement": ">= 3.2.0 < 4.0.0"
}
],
"requirements": [
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/basic_webhook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class {'r10k::webhook::config':
enable_ssl => false,
protected => false,
use_mcollective => false,
notify => Service['webhook'],
notify => Service['webhook.service'],
}
class {'r10k::webhook':
Expand Down
42 changes: 0 additions & 42 deletions spec/acceptance/nodesets/default.yml

This file was deleted.

2 changes: 1 addition & 1 deletion spec/acceptance/prefix_webhook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class {'r10k::webhook::config':
prefix => true,
prefix_command => '/usr/local/bin/prefix_command.rb',
require => File['/usr/local/bin/prefix_command.rb'],
notify => Service['webhook'],
notify => Service['webhook.service'],
}
class {'r10k::webhook':
require => Class['r10k::webhook::config'],
Expand Down
Loading