diff --git a/manifests/module/incubator.pp b/manifests/module/incubator.pp index 2ecab28..130afe6 100644 --- a/manifests/module/incubator.pp +++ b/manifests/module/incubator.pp @@ -1,28 +1,28 @@ # == Class: icingaweb2::module::incubator # # Install and enable the incubator module. # # === Parameters # # [*ensure*] # Enable or disable module. Defaults to `present` # # [*git_repository*] # Set a git repository URL. Defaults to github. # # [*git_revision*] # Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. # class icingaweb2::module::incubator( + String $git_revision, Enum['absent', 'present'] $ensure = 'present', String $git_repository = 'https://github.com/Icinga/icingaweb2-module-incubator.git', - String $git_revision = undef, ){ icingaweb2::module { 'incubator': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, } } diff --git a/manifests/module/ipl.pp b/manifests/module/ipl.pp index eeb6b76..2b91321 100644 --- a/manifests/module/ipl.pp +++ b/manifests/module/ipl.pp @@ -1,28 +1,28 @@ # == Class: icingaweb2::module::ipl # # Install and enable the ipl module. # # === Parameters # # [*ensure*] # Enable or disable module. Defaults to `present` # # [*git_repository*] # Set a git repository URL. Defaults to github. # # [*git_revision*] # Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. # class icingaweb2::module::ipl( + String $git_revision, Enum['absent', 'present'] $ensure = 'present', String $git_repository = 'https://github.com/Icinga/icingaweb2-module-ipl.git', - String $git_revision = undef, ){ icingaweb2::module { 'ipl': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, } } diff --git a/manifests/module/reactbundle.pp b/manifests/module/reactbundle.pp index f446330..cd050c9 100644 --- a/manifests/module/reactbundle.pp +++ b/manifests/module/reactbundle.pp @@ -1,29 +1,29 @@ # == Class: icingaweb2::module::reactbundle # # Install and enable the reactbundle module. # # === Parameters # # [*ensure*] # Enable or disable module. Defaults to `present` # # [*git_repository*] # Set a git repository URL. Defaults to github. # # [*git_revision*] # Set either a branch or a tag name, eg. `stable/0.7.0` or `v0.7.0`. # class icingaweb2::module::reactbundle( + String $git_revision, Enum['absent', 'present'] $ensure = 'present', String $git_repository = 'https://github.com/Icinga/icingaweb2-module-reactbundle.git', - String $git_revision = undef, ){ icingaweb2::module { 'reactbundle': ensure => $ensure, git_repository => $git_repository, git_revision => $git_revision, } } diff --git a/manifests/repo.pp b/manifests/repo.pp index b8bebe8..8fe5966 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -1,104 +1,104 @@ # == Class: icingaweb2::repo # # This class manages the packages.icinga.com repository based on the operating system. # # === Parameters # # This class does not provide any parameters. # To control the behaviour of this class, have a look at the parameters: # * icingaweb2::manage_repo # # === Examples # # This class is private and should not be called by others than this module. # class icingaweb2::repo { assert_private("You're not supposed to use this defined type manually.") if $::icingaweb2::manage_repo and $::icingaweb2::manage_package { case $::facts['os']['family'] { 'redhat': { case $::facts['os']['name'] { 'centos', 'redhat': { yumrepo { 'icinga-stable-release': baseurl => "http://packages.icinga.com/epel/${::facts['os']['release']['major']}/release/", descr => 'ICINGA (stable release for epel)', enabled => 1, gpgcheck => 1, gpgkey => 'http://packages.icinga.com/icinga.key', } } default: { fail('Your plattform is not supported to manage a repository.') } } } 'debian': { case $::facts['os']['name'] { 'debian': { include ::apt, ::apt::backports apt::source { 'icinga-stable-release': location => 'http://packages.icinga.com/debian', release => "icinga-${::facts['lsbdistcodename']}", repos => 'main', key => { id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682', source => 'http://packages.icinga.com/icinga.key', }; } } 'ubuntu': { include ::apt apt::source { 'icinga-stable-release': location => 'http://packages.icinga.com/ubuntu', release => "icinga-${::facts['lsbdistcodename']}", repos => 'main', key => { id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682', source => 'http://packages.icinga.com/icinga.key', }; } } default: { fail('Your plattform is not supported to manage a repository.') } } contain ::apt::update } 'suse': { file { '/etc/pki/GPG-KEY-icinga': ensure => present, source => 'http://packages.icinga.com/icinga.key', } exec { 'import icinga gpg key': path => '/bin:/usr/bin:/sbin:/usr/sbin', command => 'rpm --import /etc/pki/GPG-KEY-icinga', - unless => "rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/GPG-KEY-icinga) | cut --characters=11-18 | tr [A-Z] [a-z]`", + unless => 'rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/GPG-KEY-icinga) | cut --characters=11-18 | tr [A-Z] [a-z]', require => File['/etc/pki/GPG-KEY-icinga'], logoutput => 'on_failure', } case $::facts['os']['name'] { 'SLES': { zypprepo { 'icinga-stable-release': baseurl => "http://packages.icinga.com/SUSE/${::facts['os']['release']['full']}/release/", enabled => 1, gpgcheck => 1, require => Exec['import icinga gpg key'] } } default: { fail('Your plattform is not supported to manage a repository.') } } } default: { fail('Your plattform is not supported to manage a repository.') } } } # if $::icinga::manage_repo }