Skip to content

Commit

Permalink
Merge pull request #184 from treydock/puppet
Browse files Browse the repository at this point in the history
Drop Puppet 5, support Puppet 7
  • Loading branch information
treydock authored Mar 6, 2021
2 parents c301d94 + 7854e4f commit 488c70d
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 39 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ jobs:
fail-fast: false
matrix:
include:
- ruby: 2.4.9
puppet: 5
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.5.7
puppet: 6
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.4.9
puppet: 5
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 2.7.0
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.5.7
puppet: 6
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 2.7.0
puppet: 7
fixtures: .fixtures-latest.yml
allow_failure: true
env:
BUNDLE_WITHOUT: system_tests:release
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
Expand Down Expand Up @@ -61,8 +61,8 @@ jobs:
- "debian-10"
- "ubuntu-1804"
puppet:
- "puppet5"
- "puppet6"
- "puppet7"
keycloak_version:
- "8.0.1"
- "12.0.1"
Expand All @@ -72,35 +72,35 @@ jobs:
- "no"
include:
- set: "centos-7"
puppet: "puppet5"
puppet: "puppet6"
keycloak_version: "8.0.1"
keycloak_full: "yes"
- set: "centos-7"
puppet: "puppet5"
puppet: "puppet6"
keycloak_version: "12.0.1"
keycloak_full: "yes"
- set: "centos-7"
puppet: "puppet6"
puppet: "puppet7"
keycloak_version: "8.0.1"
keycloak_full: "yes"
- set: "centos-7"
puppet: "puppet6"
puppet: "puppet7"
keycloak_version: "12.0.1"
keycloak_full: "yes"
- set: "centos-7-domain-mode-cluster"
puppet: "puppet5"
puppet: "puppet6"
keycloak_version: "8.0.1"
keycloak_domain_mode_cluster: "yes"
- set: "centos-7-domain-mode-cluster"
puppet: "puppet5"
puppet: "puppet6"
keycloak_version: "12.0.1"
keycloak_domain_mode_cluster: "yes"
- set: "centos-7-domain-mode-cluster"
puppet: "puppet6"
puppet: "puppet7"
keycloak_version: "8.0.1"
keycloak_domain_mode_cluster: "yes"
- set: "centos-7-domain-mode-cluster"
puppet: "puppet6"
puppet: "puppet7"
keycloak_version: "12.0.1"
keycloak_domain_mode_cluster: "yes"
env:
Expand Down
26 changes: 13 additions & 13 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
.github/workflows/ci.yaml:
unit_name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }})
unit_includes:
- ruby: '2.4.9'
puppet: '5'
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: '2.5.7'
puppet: '6'
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: '2.7.0'
puppet: '7'
fixtures: .fixtures-latest.yml
allow_failure: true
acceptance_name: '${{ matrix.puppet }} ${{ matrix.set }} (keycloak=${{ matrix.keycloak_version }} full=${{ matrix.keycloak_full }})'
acceptance_matrix:
set:
Expand All @@ -19,44 +19,44 @@
- debian-10
- ubuntu-1804
puppet:
- puppet5
- puppet6
- puppet7
keycloak_version:
- '8.0.1'
- '12.0.1'
keycloak_full: ['no']
keycloak_domain_mode_cluster: ['no']
acceptance_includes:
- set: centos-7
puppet: puppet5
puppet: puppet6
keycloak_version: 8.0.1
keycloak_full: 'yes'
- set: centos-7
puppet: puppet5
puppet: puppet6
keycloak_version: 12.0.1
keycloak_full: 'yes'
- set: centos-7
puppet: puppet6
puppet: puppet7
keycloak_version: 8.0.1
keycloak_full: 'yes'
- set: centos-7
puppet: puppet6
puppet: puppet7
keycloak_version: 12.0.1
keycloak_full: 'yes'
- set: centos-7-domain-mode-cluster
puppet: puppet5
puppet: puppet6
keycloak_version: 8.0.1
keycloak_domain_mode_cluster: 'yes'
- set: centos-7-domain-mode-cluster
puppet: puppet5
puppet: puppet6
keycloak_version: 12.0.1
keycloak_domain_mode_cluster: 'yes'
- set: centos-7-domain-mode-cluster
puppet: puppet6
puppet: puppet7
keycloak_version: 8.0.1
keycloak_domain_mode_cluster: 'yes'
- set: centos-7-domain-mode-cluster
puppet: puppet6
puppet: puppet7
keycloak_version: 12.0.1
keycloak_domain_mode_cluster: 'yes'
.gitignore:
Expand Down
9 changes: 3 additions & 6 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
class keycloak::service {
assert_private()

if $::service_provider == 'systemd' {
::systemd::unit_file { 'keycloak.service':
content => template('keycloak/keycloak.service.erb'),
notify => Service['keycloak'],
}
Exec['systemctl-daemon-reload'] -> Service['keycloak']
systemd::unit_file { 'keycloak.service':
content => template('keycloak/keycloak.service.erb'),
notify => Service['keycloak'],
}

service { 'keycloak':
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.0.0 < 7.0.0"
"version_requirement": ">= 6.0.0 < 8.0.0"
}
],
"pdk-version": "1.17.0",
"template-url": "https://github.com/treydock/pdk-templates.git#master",
"template-ref": "heads/master-0-g1f52e6d"
"template-ref": "heads/master-0-gc21ae9d"
}
2 changes: 2 additions & 0 deletions spec/acceptance/1_domain_mode_cluster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
it 'launches' do
db_pp = <<-EOS
class { '::postgresql::globals':
encoding => 'UTF-8',
locale => 'en_US.UTF-8',
manage_package_repo => true,
version => '9.6',
}
Expand Down
12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/centos-7-domain-mode-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ HOSTS:
- '/usr/sbin/init'
docker_image_commands:
- 'yum install -y wget which cronie iproute initscripts'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'keycloak-master-el7'
slave:
roles:
Expand All @@ -25,6 +29,10 @@ HOSTS:
- '/usr/sbin/init'
docker_image_commands:
- 'yum install -y wget which cronie iproute initscripts'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'keycloak-slave-el7'
db:
roles:
Expand All @@ -38,6 +46,10 @@ HOSTS:
- '/usr/sbin/init'
docker_image_commands:
- 'yum install -y wget which cronie iproute initscripts'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'keycloak-db-el7'
CONFIG:
log_level: debug
Expand Down
7 changes: 6 additions & 1 deletion spec/spec_helper_acceptance_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@
debian10_yaml = <<-EOS
mysql::bindings::java_package_name: libmariadb-java
EOS
centos7_yaml = <<-EOS
postgresql::server::service_reload: 'systemctl reload postgresql 2>/dev/null 1>/dev/null'
EOS
common_yaml = <<-EOS
---
keycloak::version: '#{RSpec.configuration.keycloak_version}'
postgresql::globals::service_status: 'service postgresql status'
postgresql::server::service_status: 'service postgresql status 2>/dev/null 1>/dev/null'
EOS

create_remote_file(hosts, '/etc/puppetlabs/puppet/hiera.yaml', hiera_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/common.yaml', common_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/Debian'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/Debian/10.yaml', debian10_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/RedHat'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/RedHat/7.yaml', centos7_yaml)

0 comments on commit 488c70d

Please sign in to comment.