From 9b5c704da88298fa14016f25b93680db3f889b2b Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Tue, 3 Jun 2014 14:44:13 +0200 Subject: [PATCH] Puppet/Icinga2: Fix installation for Icinga2-2.0.0beta2 --- .vagrant-puppet/files/etc/icinga2/constants.conf | 15 +++++++++++++++ .vagrant-puppet/manifests/default.pp | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .vagrant-puppet/files/etc/icinga2/constants.conf diff --git a/.vagrant-puppet/files/etc/icinga2/constants.conf b/.vagrant-puppet/files/etc/icinga2/constants.conf new file mode 100644 index 000000000..9e6ed51af --- /dev/null +++ b/.vagrant-puppet/files/etc/icinga2/constants.conf @@ -0,0 +1,15 @@ +/** + * This file defines global constants which can be used in + * the other configuration files. + */ + +/* The directory which contains the plugins from the Monitoring Plugins project. */ +const PluginDir = "/usr/lib64/nagios/plugins" + +/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`. + * This should be the common name from the API certificate. +*/ +const NodeName = "localhost" + +/* Our local zone name. */ +const ZoneName = NodeName diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index 64f829fd2..fa1fde291 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -6,7 +6,7 @@ include openldap Exec { path => '/bin:/usr/bin:/sbin' } $icingaVersion = '1.11.2' -$icinga2Version = '0.0.11' +$icinga2Version = '2.0.0' exec { 'create-mysql-icinga-db': unless => 'mysql -uicinga -picinga icinga', @@ -411,6 +411,13 @@ file { '/etc/icinga2/conf.d/commands.conf': require => Exec['install icinga2'] } +file { '/etc/icinga2/constants.conf': + source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/constants.conf', + owner => 'icinga', + group => 'icinga', + require => Exec['install icinga2'] +} + service { 'icinga2': ensure => running, require => [