diff --git a/manifests/webhook.pp b/manifests/webhook.pp new file mode 100644 index 00000000..faac7251 --- /dev/null +++ b/manifests/webhook.pp @@ -0,0 +1,10 @@ +# Class: r10k::webhook +# +# +class r10k::webhook ( + Boolean $ensure = true, + String $user = $r10k::params::webhook_user, + String $password = $r10k::params::webhook_password, +) { + # resources +} diff --git a/manifests/webhook/config.pp b/manifests/webhook/config.pp new file mode 100644 index 00000000..7a2c70a3 --- /dev/null +++ b/manifests/webhook/config.pp @@ -0,0 +1,8 @@ +# Class: r10k::webhook::config +# +# +class r10k::webhook::config ( + R10k::Webhook::Config $config +) { + # resources +} diff --git a/manifests/webhook/package.pp b/manifests/webhook/package.pp new file mode 100644 index 00000000..f8ae9849 --- /dev/null +++ b/manifests/webhook/package.pp @@ -0,0 +1,26 @@ +# Class: r10k::webhook::package +# +# +class r10k::webhook::package ( + String $version = '2.0.1', +) { + case $facts['os']['name'] { + 'RedHat', 'CentOS': { + $provider = 'rpm' + $package_url = "https://github.com/voxpupuli/webhook-go/releases/download/v${version}/webhook-go_${version}_linux_amd64.rpm" + } + 'Debian', 'Ubuntu': { + $provider = 'dpkg' + $package_url = "https://github.com/voxpupuli/webhook-go/releases/download/v${version}/webhook-go_${version}_linux_amd64.deb" + } + default: { + fail("Operating system ${facts['os']['name']} not supported for packages") + } + } + + package { 'webhook-go': + ensure => 'present', + source => $package_url, + proviser => $provider, + } +} diff --git a/manifests/webhook/service.pp b/manifests/webhook/service.pp new file mode 100644 index 00000000..a9fc66cb --- /dev/null +++ b/manifests/webhook/service.pp @@ -0,0 +1,8 @@ +# Class: r10k::webhook::service +# +# +class r10k::webhook::service { + service { 'webhook': + ensure => 'running', + } +}