Puppet Class: r10k::webhook::package
- Defined in:
- manifests/webhook/package.pp
Overview
Class: r10k::webhook::package
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'manifests/webhook/package.pp', line 4
class r10k::webhook::package () {
case $r10k::webhook::install_method { # lint:ignore:case_without_default
'package': {
case $facts['os']['family'] {
'RedHat': {
$provider = 'rpm'
$pkg_file = '/tmp/webhook-go.rpm'
$package_url = "https://github.com/voxpupuli/webhook-go/releases/download/v${r10k::webhook::version}/webhook-go_${r10k::webhook::version}_linux_amd64.rpm"
}
'Debian', 'Ubuntu': {
$provider = 'dpkg'
$pkg_file = '/tmp/webhook-go.deb'
$package_url = "https://github.com/voxpupuli/webhook-go/releases/download/v${r10k::webhook::version}/webhook-go_${r10k::webhook::version}_linux_amd64.deb"
}
default: {
fail("Operating system ${facts['os']['name']} not supported for packages")
}
}
file { $pkg_file:
ensure => file,
source => $package_url,
before => Package['webhook-go'],
}
package { 'webhook-go':
ensure => 'present',
source => $pkg_file,
provider => $provider,
}
}
'repo': {
warning('webhook-go: configuring a repo is not implemented yet')
}
# none = people configure a repo on their own
'none': {
package { 'webhook-go':
ensure => 'installed',
}
}
}
}
|