Add debmon support
Signed-off-by: Nick Chappell <nick@intronic.org>
This commit is contained in:
parent
2e8770f9cb
commit
4dd15a17e7
5 changed files with 24 additions and 1 deletions
|
@ -112,6 +112,8 @@ class { 'icinga2::server':
|
|||
|
||||
When the `server_db_type` parameter is set, the right IDO database connection packages are automatically installed and the schema is loaded.
|
||||
|
||||
If you want to use [Debmon repository](http://debmon.org/packages) for Debian 7, you have to set `use_debmon` to true when you call `icinga2::server` class.
|
||||
|
||||
**Note:** For production use, you'll probably want to get the database password via a [Hiera lookup](http://docs.puppetlabs.com/hiera/1/puppet.html) so the password isn't sitting in your site manifests in plain text:
|
||||
|
||||
<pre>
|
||||
|
|
|
@ -46,6 +46,7 @@ class icinga2::params {
|
|||
|
||||
#Whether to manage the package repositories
|
||||
$manage_repos = true
|
||||
$use_debmon = false
|
||||
$server_db_type = 'pgsql'
|
||||
$install_mail_utils_package = false
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
class icinga2::server (
|
||||
$manage_repos = $icinga2::params::manage_repos,
|
||||
$use_debmon = $icinga2::params::use_debmon,
|
||||
$server_db_type = $icinga2::params::server_db_type,
|
||||
$db_name = $icinga2::params::db_name,
|
||||
$db_user = $icinga2::params::db_user,
|
||||
|
@ -27,6 +28,7 @@ class icinga2::server (
|
|||
|
||||
#Do some validation of parameters so we know we have the right data types:
|
||||
validate_bool($manage_repos)
|
||||
validate_bool($use_debmon)
|
||||
validate_string($server_db_type)
|
||||
validate_string($db_name)
|
||||
validate_string($db_user)
|
||||
|
|
14
manifests/server/debmon_repo.pp
Normal file
14
manifests/server/debmon_repo.pp
Normal file
|
@ -0,0 +1,14 @@
|
|||
class icinga2::server::debmon_repo {
|
||||
|
||||
apt::source { 'debmon':
|
||||
location => 'http://debmon.org/debmon',
|
||||
release => "debmon-${lsbdistcodename}",
|
||||
repos => 'main',
|
||||
key_source => 'http://debmon.org/debmon/repo.key',
|
||||
key => 'BC7D020A',
|
||||
include_src => false,
|
||||
# backports repo use 200
|
||||
pin => '300'
|
||||
}
|
||||
|
||||
}
|
|
@ -57,7 +57,11 @@ class icinga2::server::install::repos inherits icinga2::server {
|
|||
#Debian systems:
|
||||
'Debian': {
|
||||
#On Debian (7) icinga2 packages are on backports
|
||||
include apt::backports
|
||||
if $use_debmon == false {
|
||||
include apt::backports
|
||||
} else {
|
||||
include icinga2::server::debmon_repo
|
||||
}
|
||||
}
|
||||
|
||||
#Fail if we're on any other OS:
|
||||
|
|
Loading…
Reference in a new issue