diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b92ed42e7acd46451f388acdd177c62644e80a6..f005b1c74c23dfe41c9b5808e1ccb97c8c7aef4d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,6 +74,38 @@ acceptance with puppet7 ubuntu2004: - bundle exec rake beaker tags: - puppet-tests +acceptance with puppet6 ubuntu2204: + needs: + - parallel_spec-Ruby 2.7.5-Puppet ~> 6 + stage: acceptance + variables: + RBENV_VERSION: 2.7.5 + PUPPET_INSTALL_TYPE: agent + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: puppet6 + BEAKER_debug: 'true' + BEAKER_setfile: ubuntu2204-64 + BEAKER_HYPERVISOR: docker + script: + - bundle exec rake beaker + tags: + - puppet-tests +acceptance with puppet7 ubuntu2204: + needs: + - parallel_spec-Ruby 2.7.5-Puppet ~> 7 + stage: acceptance + variables: + RBENV_VERSION: 2.7.5 + PUPPET_INSTALL_TYPE: agent + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: puppet7 + BEAKER_debug: 'true' + BEAKER_setfile: ubuntu2204-64 + BEAKER_HYPERVISOR: docker + script: + - bundle exec rake beaker + tags: + - puppet-tests module release: stage: release image: ruby:2.7.5 diff --git a/.sync.yml b/.sync.yml index 605eb6bc84d659f26debb0f79ffe2701aef8203a..54f5a9dc4e0e2ff822f7e1a4d89a2d5cdb830761 100644 --- a/.sync.yml +++ b/.sync.yml @@ -76,6 +76,38 @@ appveyor.yml: - bundle exec rake beaker tags: - puppet-tests + acceptance with puppet6 ubuntu2204: + needs: + - parallel_spec-Ruby 2.7.5-Puppet ~> 6 + stage: acceptance + variables: + RBENV_VERSION: '2.7.5' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet6' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu2204-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests + acceptance with puppet7 ubuntu2204: + needs: + - parallel_spec-Ruby 2.7.5-Puppet ~> 7 + stage: acceptance + variables: + RBENV_VERSION: '2.7.5' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet7' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu2204-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests module release: stage: release image: ruby:2.7.5 diff --git a/manifests/goose.pp b/manifests/goose.pp index 133ec78a5061caa98d4225b27e27c6646fd3d7b1..7746f1a0440a92f8dc001bc65e95507edd07632d 100644 --- a/manifests/goose.pp +++ b/manifests/goose.pp @@ -18,7 +18,7 @@ class cfssl::goose { target => $cfssl::params::go_targetlink, } -> exec { 'install goose': - command => '/usr/local/bin/go get bitbucket.org/liamstask/goose/cmd/goose', + command => '/usr/local/bin/go install bitbucket.org/liamstask/goose/cmd/goose@latest', creates => "/home/${cfssl::sysuser}/go/bin/goose", user => $cfssl::sysuser, environment => ["HOME=/home/${cfssl::sysuser}"], diff --git a/manifests/params.pp b/manifests/params.pp index bcfe87a1e1b647e42a3646ece699bfb43c9bdf93..9088a369338b367070feecbedfef3a904a5398fc 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -10,6 +10,18 @@ class cfssl::params { $db_config_json = 'db-config.json' $systemd_unitdir = '/etc/systemd/system' $systemd_unit_file = "${systemd_unitdir}/cfssl.service" - $go_package = 'golang-1.16' - $go_targetlink = '/usr/lib/go-1.16/bin/go' + + case $facts['os']['release']['major'] { + '20.04': { + $go_package = 'golang-1.16-go' + $go_targetlink = '/usr/lib/go-1.16/bin/go' + } + '22.04': { + $go_package = 'golang-1.17-go' + $go_targetlink = '/usr/lib/go-1.17/bin/go' + } + default: { + fail("${module_name} does not support OS ${facts['os']['name']}-${facts['os']['release']['major']}") + } + } } diff --git a/metadata.json b/metadata.json index 6f3b3f43d41043c208399ee5979acca340db0a09..35eeeb6e32270ca908cee2a4601a6a19f5395895 100644 --- a/metadata.json +++ b/metadata.json @@ -29,7 +29,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "20.04" + "20.04", + "22.04" ] } ],