Merge pull request #15 from hammondr/master

Add support for repo_gpgcheck to the hashicorp yum repo
This commit is contained in:
Tim Meusel 2022-02-17 16:15:26 +01:00 committed by GitHub
commit e2ada9acb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,7 @@ class hashi_stack::repo (
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', String $rpm_base = 'https://rpm.releases.hashicorp.com',
Integer[0,1] $repo_gpgcheck = 0,
) { ) {
case $facts['os']['family'] { case $facts['os']['family'] {
'Debian': { 'Debian': {
@ -49,13 +50,14 @@ class hashi_stack::repo (
} }
'RedHat': { 'RedHat': {
yumrepo { 'HashiCorp': yumrepo { 'HashiCorp':
descr => $description, descr => $description,
baseurl => "${rpm_base}/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,
proxy => $proxy, enabled => 1,
priority => $priority, proxy => $proxy,
priority => $priority,
} }
} }
default: { default: {