mirror of
https://github.com/voxpupuli/puppet-hashi_stack.git
synced 2025-05-29 14:55:35 +01:00
adding acceptance setup
This commit is contained in:
parent
1822503711
commit
fe9ef733e1
4 changed files with 103 additions and 5 deletions
|
@ -1,2 +1,56 @@
|
|||
# hashi_stack::repo
|
||||
#
|
||||
class hashi_stack::repo {}
|
||||
# @summary Set up the package repository for the HashiCorp Stack components
|
||||
#
|
||||
# @example
|
||||
# include hashi_stack::repo
|
||||
#
|
||||
# @param priority A numeric priority for the repo, passed to the package management system
|
||||
# @param proxy The URL of a HTTP proxy to use for package downloads (YUM only)
|
||||
# @param base_repo_url The base url for the repo path
|
||||
class hashi_stack::repo (
|
||||
Optional[Integer] $priority = undef,
|
||||
String $proxy = 'absent',
|
||||
) {
|
||||
$key_id='E8A032E094D8EB4EA189D270DA418C88A3219F7B'
|
||||
$key_source='https://apt.releases.hashicorp.com/gpg'
|
||||
$description='HashiCorp package repository.'
|
||||
|
||||
case $facts['os']['family'] {
|
||||
'Debian': {
|
||||
include apt
|
||||
|
||||
apt::source { 'HashiCorp':
|
||||
ensure => 'present',
|
||||
architecture => 'amd64',
|
||||
comment => $description,
|
||||
location => 'https://apt.releases.hashicorp.com',
|
||||
release => 'stable',
|
||||
repos => 'main',
|
||||
key => {
|
||||
'id' => $key_id,
|
||||
'source' => $key_source,
|
||||
},
|
||||
include => {
|
||||
'deb' => true,
|
||||
'src' => false,
|
||||
},
|
||||
pin => $priority,
|
||||
}
|
||||
}
|
||||
'RedHat', 'Linux': {
|
||||
yumrepo { 'HashiCorp':
|
||||
descr => $description,
|
||||
baseurl => 'https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable',
|
||||
gpgcheck => 1,
|
||||
gpgkey => $key_source,
|
||||
enabled => 1,
|
||||
proxy => $proxy,
|
||||
priority => $priority,
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("\"${module_name}\" provides no repository information for OSfamily \"${facts['os']['family']}\"")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue