Skip to content

Commit

Permalink
Merge pull request #474 from voxpupuli/repo
Browse files Browse the repository at this point in the history
Update repo location
  • Loading branch information
bastelfreak authored Aug 6, 2021
2 parents 7f35356 + 7eed24d commit 8b7dc2e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 28 deletions.
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
#
# Key ID for the GPG key for the Debian package
#
# [*repo_apt_gpgkey*]
#
# Location where the GPG key can be found
#
# [*repo_apt_keyserver*]
#
# Keysever for the GPG key for the Debian package
Expand Down Expand Up @@ -270,6 +274,7 @@
String $repo_yum_gpgkey = $rundeck::params::repo_yum_gpgkey,
Stdlib::HTTPUrl $repo_apt_source = $rundeck::params::repo_apt_source,
String $repo_apt_key_id = $rundeck::params::repo_apt_key_id,
Stdlib::Httpsurl $repo_apt_gpgkey = $rundeck::params::repo_apt_gpgkey,
String $repo_apt_keyserver = $rundeck::params::repo_apt_keyserver,
Boolean $rss_enabled = $rundeck::params::rss_enabled,
Hash $security_config = $rundeck::params::security_config,
Expand Down
24 changes: 13 additions & 11 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@
case $facts['os']['family'] {
'RedHat': {
if $manage_repo {
yumrepo { 'bintray-rundeck':
baseurl => $repo_yum_source,
descr => 'bintray rundeck repo',
enabled => '1',
gpgcheck => '1',
gpgkey => $repo_yum_gpgkey,
priority => '1',
before => Package['rundeck'],
yumrepo { 'rundeck':
baseurl => $repo_yum_source,
descr => 'rundeck repo',
enabled => '1',
gpgcheck => '0',
gpgkey => $repo_yum_gpgkey,
repo_gpgcheck => '1',
priority => '1',
before => Package['rundeck'],
}
}

Expand All @@ -73,12 +74,13 @@
'Debian': {
if $manage_repo {
include apt
apt::source { 'bintray-rundeck':
apt::source { 'rundeck':
location => $repo_apt_source,
release => '/',
repos => '',
release => 'any',
repos => 'main',
key => {
id => $repo_apt_key_id,
source => $rundeck::repo_apt_gpgkey,
server => $repo_apt_keyserver,
},
before => Package['rundeck'],
Expand Down
9 changes: 5 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
$package_ensure = 'installed'
$service_name = 'rundeckd'
$manage_repo = true
$repo_yum_source = 'http://dl.bintray.com/rundeck/rundeck-rpm/'
$repo_yum_gpgkey = 'https://bintray.com/user/downloadSubjectPublicKey?username=rundeck'
$repo_apt_source = 'https://dl.bintray.com/rundeck/rundeck-deb'
$repo_apt_key_id = '8756C4F765C9AC3CB6B85D62379CE192D401AB61'
$repo_yum_source = 'https://packagecloud.io/pagerduty/rundeck/rpm_any/rpm_any/$basearch'
$repo_yum_gpgkey = 'https://packagecloud.io/pagerduty/rundeck/gpgkey'
$repo_apt_source = 'https://packagecloud.io/pagerduty/rundeck/any'
$repo_apt_key_id = '0DDD2FA79B15D736ECEA32B89B5206167C5C34C0'
$repo_apt_gpgkey = 'https://packagecloud.io/pagerduty/rundeck/gpgkey'
$repo_apt_keyserver = 'keyserver.ubuntu.com'

case $facts['os']['family'] {
Expand Down
12 changes: 6 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.25.0 < 7.0.0"
"version_requirement": ">= 4.25.0 < 8.0.0"
},
{
"name": "pltraining/dirtree",
"version_requirement": ">= 0.3.0 < 2.0.0"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 1.4.1 < 5.0.0"
"version_requirement": ">= 1.4.1 < 6.0.0"
},
{
"name": "puppet/archive",
"version_requirement": ">= 1.0.0 < 5.0.0"
"name": "puppetlabs/java_ks",
"version_requirement": ">= 1.3.1 < 5.0.0"
},
{
"name": "puppetlabs/java_ks",
"version_requirement": ">= 1.3.1 < 4.0.0"
"name": "puppet/archive",
"version_requirement": ">= 1.0.0 < 6.0.0"
}
],
"requirements": [
Expand Down
11 changes: 6 additions & 5 deletions spec/classes/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
case facts[:os]['family']
when 'RedHat'
it do
is_expected.to contain_yumrepo('bintray-rundeck').with(
baseurl: 'http://dl.bintray.com/rundeck/rundeck-rpm/',
gpgcheck: 1,
gpgkey: 'https://bintray.com/user/downloadSubjectPublicKey?username=rundeck'
is_expected.to contain_yumrepo('rundeck').with(
baseurl: "https://packagecloud.io/pagerduty/rundeck/rpm_any/rpm_any/\$basearch",
gpgcheck: 0,
repo_gpgcheck: 1,
gpgkey: 'https://packagecloud.io/pagerduty/rundeck/gpgkey'
).that_comes_before('Package[rundeck]')
end
when 'Debian'
it { is_expected.to contain_apt__source('bintray-rundeck').with_location('https://dl.bintray.com/rundeck/rundeck-deb') }
it { is_expected.to contain_apt__source('rundeck').with_location('https://packagecloud.io/pagerduty/rundeck/any') }
it { is_expected.to contain_package('rundeck').that_notifies('Class[rundeck::service]') }
it { is_expected.to contain_package('rundeck').that_requires('Class[apt::update]') }
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'voxpupuli/acceptance/spec_helper_acceptance'

configure_beaker do |host|
install_module_from_forge_on(host, 'puppetlabs-java', '>= 2.1.0 < 7.0.0')
install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 8.0.0')
install_module_from_forge_on(host, 'puppetlabs-java', '>= 2.1.0 < 8.0.0')
install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0')
end

0 comments on commit 8b7dc2e

Please sign in to comment.