deduplicate puppet code: Fix merge conflicts
This commit is contained in:
parent
96dcc79f11
commit
114a648b4f
|
@ -6,11 +6,10 @@ include openldap
|
|||
include profile::icingaweb2
|
||||
include profile::nodejs
|
||||
|
||||
Exec { path => '/bin:/usr/bin:/sbin' }
|
||||
Exec { path => '/bin:/usr/bin:/sbin:/usr/sbin' }
|
||||
|
||||
$icingaVersion = '1.11.5'
|
||||
$icinga2Version = '2.0.1'
|
||||
$pluginVersion = '2.0'
|
||||
$livestatusVersion = '1.2.4p5'
|
||||
$phantomjsVersion = '1.9.1'
|
||||
$casperjsVersion = '1.0.2'
|
||||
|
@ -70,17 +69,6 @@ exec { 'icinga-htpasswd':
|
|||
require => Class['apache']
|
||||
}
|
||||
|
||||
cmmi { 'icinga-plugins':
|
||||
url => "https://www.monitoring-plugins.org/download/monitoring-plugins-${pluginVersion}.tar.gz",
|
||||
output => "monitoring-plugins-${pluginVersion}.tar.gz",
|
||||
flags => '--prefix=/usr/lib64/nagios/plugins \
|
||||
--with-nagios-user=icinga --with-nagios-group=icinga \
|
||||
--with-cgiurl=/icinga-mysql/cgi-bin',
|
||||
creates => '/usr/lib64/nagios/plugins/libexec',
|
||||
make => 'make && make install',
|
||||
require => User['icinga']
|
||||
}
|
||||
|
||||
cmmi { 'mk-livestatus':
|
||||
url => "http://mathias-kettner.de/download/mk-livestatus-${livestatusVersion}.tar.gz",
|
||||
output => "mk-livestatus-${livestatusVersion}.tar.gz",
|
||||
|
@ -179,6 +167,8 @@ exec { 'install nagios-plugins-all':
|
|||
unless => 'rpm -qa | grep nagios-plugins-all',
|
||||
require => [ Class['epel'], Package['icinga2'] ],
|
||||
}
|
||||
# vs include monitoring-plugins (epel is disabled)
|
||||
|
||||
|
||||
# icinga 2 classic ui
|
||||
package { 'icinga-gui':
|
||||
|
|
|
@ -10,7 +10,7 @@ class profile::icinga-mysql ($icingaVersion) {
|
|||
--with-plugin-dir=/usr/lib64/nagios/plugins/libexec',
|
||||
creates => '/usr/local/icinga-mysql',
|
||||
make => 'make all && make fullinstall install-config',
|
||||
require => [ User['icinga'], Cmmi['icinga-plugins'], Package['apache'] ],
|
||||
require => [ User['icinga'], Exec['install nagios-plugins-all'], Package['apache'] ],
|
||||
notify => Service['apache'],
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class profile::icinga-pgsql ($icingaVersion) {
|
|||
--with-plugin-dir=/usr/lib64/nagios/plugins/libexec',
|
||||
creates => '/usr/local/icinga-pgsql',
|
||||
make => 'make all && make fullinstall install-config',
|
||||
require => [ User['icinga'], Cmmi['icinga-plugins'], Package['apache'] ],
|
||||
require => [ User['icinga'], Exec['install nagios-plugins-all'], Package['apache'] ],
|
||||
notify => Service['apache'],
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ class profile::icinga2 ($icinga2Version) {
|
|||
username => 'icinga2',
|
||||
password => 'icinga2',
|
||||
privileges => 'SELECT,INSERT,UPDATE,DELETE',
|
||||
schemafile => "/usr/share/doc/icinga2-ido-mysql-${icinga2Version}/schema/mysql.sql",
|
||||
schemafile => '/usr/share/icinga2-ido-mysql/schema/mysql.sql',
|
||||
requirement => Package['icinga2-ido-mysql'],
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class profile::icingaweb2 {
|
|||
}
|
||||
|
||||
file { '/etc/icingaweb/authentication.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/authentication.ini',
|
||||
source => 'puppet:////vagrant/config/authentication.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/etc/icingaweb'],
|
||||
|
@ -60,20 +60,20 @@ class profile::icingaweb2 {
|
|||
}
|
||||
|
||||
file { '/etc/icingaweb/menu.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/menu.ini',
|
||||
source => 'puppet:////vagrant/config/menu.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
# replace => false,
|
||||
}
|
||||
|
||||
file { '/etc/icingaweb/resources.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/resources.ini',
|
||||
source => 'puppet:////vagrant/config/resources.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
replace => false
|
||||
}
|
||||
|
||||
file { ['/etc/icingaweb/enabledModules', '/etc/icingaweb/modules', '/etc/icingaweb/modules/monitoring']:
|
||||
file { ['/etc/icingaweb/enabledModules', '/etc/icingaweb/modules', '/etc/icingaweb/modules/monitoring', '/etc/icingaweb/modules/doc']:
|
||||
ensure => 'directory',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
|
@ -85,14 +85,20 @@ class profile::icingaweb2 {
|
|||
group => 'apache',
|
||||
}
|
||||
|
||||
file { '/etc/icingaweb/modules/monitoring/config.ini':
|
||||
source => 'puppet:////vagrant/config/modules/monitoring/config.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
}
|
||||
|
||||
file { '/etc/icingaweb/modules/monitoring/instances.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/modules/monitoring/instances.ini',
|
||||
source => 'puppet:////vagrant/config/modules/monitoring/instances.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
}
|
||||
|
||||
file { '/etc/icingaweb/modules/monitoring/menu.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/modules/monitoring/menu.ini',
|
||||
source => 'puppet:////vagrant/config/modules/monitoring/menu.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
}
|
||||
|
@ -104,7 +110,13 @@ class profile::icingaweb2 {
|
|||
}
|
||||
|
||||
file { '/etc/icingaweb/dashboard/dashboard.ini':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/dashboard/dashboard.ini',
|
||||
source => 'puppet:////vagrant/config/dashboard/dashboard.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
}
|
||||
|
||||
file { '/etc/icingaweb/modules/doc/menu.ini':
|
||||
source => 'puppet:////vagrant/config/modules/doc/menu.ini',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue