Paladox has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/361221 )
Change subject: Move somethings to puppet and puppicise some things
..
Move somethings to puppet and puppicise some things
Change-Id: I127f438b01151a0dd8d38fc219b1b960f9d3f89c
---
A files/icinga2.gpg
D files/icingaweb2.gpg
M manifests/init.pp
M manifests/plugins.pp
M manifests/web.pp
A templates/backends.ini.erb
A templates/commandtransports.ini.erb
A templates/ido-mysql.erb
A templates/roles.ini.erb
9 files changed, 122 insertions(+), 28 deletions(-)
Approvals:
Paladox: Verified; Looks good to me, approved
diff --git a/files/icinga2.gpg b/files/icinga2.gpg
new file mode 100644
index 000..901c78c
--- /dev/null
+++ b/files/icinga2.gpg
@@ -0,0 +1,30 @@
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+mQGiBFKHzk4RBACSHMIFTtfw4ZsNKAA03Gf5t7ovsKWnS7kcMYleAidypqhOmkGg
+0petiYsMPYT+MOepCJFGNzwQwJhZrdLUxxMSWay4Xj0ArgpD9vbvU+gj8Tb02l+x
+SqNGP8jXMV5UnK4gZsrYGLUPvx47uNNYRIRJAGOPYTvohhnFJiG402dzlwCg4u5I
+1RdFplkp9JM6vNM9VBIAmcED/2jr7UQGsPs8YOiPkskGHLh/zXgO8SvcNAxCLgbp
+BjGcF4Iso/A2TAI/2KGJW6kBW/Paf722ltU6s/6mutdXJppgNAz5nfpEt4uZKZyu
+oSWf77179B2B/Wl1BsX/Oc3chscAgQb2pD/qPF/VYRJU+hvdQkq1zfi6cVsxyREV
+k+IwA/46nXh51CQxE29ayuy1BoIOxezvuXFUXZ8rP6aCh4KaiN9AJoy7pBieCzsq
+d7rPEeGIzBjI+yhEu8p92W6KWzL0xduWfYg9I7a2GTk8CaLX2OCLuwnKd7RVDyyZ
+yzRjWs0T5U7SRAWspLStYxMdKert9lLyQiRHtLwmlgBPqa0gh7Q+SWNpbmdhIE9w
+ZW4gU291cmNlIE1vbml0b3JpbmcgKEJ1aWxkIHNlcnZlcikgPGluZm9AaWNpbmdh
+Lm9yZz6IYAQTEQIAIAUCUofOTgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ
+EMbjGcM0QQaCgSQAnRjXdbsyqziqhmxfAKffNJYuMPwdAKCS/IRCVyQzApFBtIBQ
+1xuoym/4C7kCDQRSh85OEAgAvPwjlURCi8z6+7i60no4n16dNcSzd6AT8Kizpv2r
+9BmNBff/GNYGnHyob/DMtmO2esEuVG8w62rO9m1wzzXzjbtmtU7NZ1Tg+C+reU2I
+GNVu3SYtEVK/UTJHAhLcgry9yD99610tYPN2Fx33Efse94mXOreBfCvDsmFGSc7j
+GVNCWXpMR3jTYyGj1igYd5ztOzG63D8gPyOucTTl+RWN/G9EoGBv6sWqk5eCd1Fs
+JlWyQX4BJn3YsCZx3uj1DWL0dAl2zqcn6m1M4oj1ozW47MqM/efKOcV6VvCs9SL8
+F/NFvZcH4LKzeupCQ5jEONqcTlVlnLlIqId95Z4DI4AV9wADBQf/S6sKA4oH49tD
+Yb5xAfUyEp5ben05TzUJbXs0Z7hfRQzy9+vQbWGamWLgg3QRUVPx1e4IT+W5vEm5
+dggNTMEwlLMI7izCPDcD32B5oxNVxlfj428KGllYWCFj+edY+xKTvw/PHnn+drKs
+LE65Gwx4BPHm9EqWHIBX6aPzbgbJZZ06f6jWVBi/N7e/5n8lkxXqS23DBKemapyu
+S1i56sH7mQSMaRZP/iiOroAJemPNxv1IQkykxw2woWMmTLKLMCD/i+4DxejE50tK
+dxaOLTc4HDCsattw/RVJO6fwE414IXHMv330z4HKWJevMQ+CmQGfswvCwgeBP9n8
+PItLjBQAXIhJBBgRAgAJBQJSh85OAhsMAAoJEMbjGcM0QQaCzpAAmwUNoRyySf9p
+5G3/2UD1PMueIwOtAKDVVDXEq5LJPVg4iafNu0SRMwgP0Q==
+=icbY
+-END PGP PUBLIC KEY BLOCK-
diff --git a/files/icingaweb2.gpg b/files/icingaweb2.gpg
deleted file mode 100644
index ac52912..000
--- a/files/icingaweb2.gpg
+++ /dev/null
@@ -1,7 +0,0 @@
--BEGIN PGP SIGNATURE-
-Version: GnuPG v1
-
-iEYEABEIAAYFAlkHqt0ACgkQxuMZwzRBBoLAuQCgndU7a0I7ryWQQ4KxtQFsRV/C
-DFIAoM8xdATxQsAJ5qEU0py/hD3Jbm2H
-=ZEPy
--END PGP SIGNATURE-
diff --git a/manifests/init.pp b/manifests/init.pp
index 837711b..f1686a9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -11,7 +11,16 @@
class icinga2(
$enable_notifications = 1,
$enable_event_handlers = 1,
+$os = hiera('icinga_apt_dist')
) {
+apt::repository { 'icinga2':
+uri=> 'http://packages.icinga.com/debian',
+dist => $os,
+components => 'main',
+source => false,
+keyfile=> 'puppet:///modules/icinga2/icinga2.gpg',
+}
+
group { 'nagios':
ensure=> present,
name => 'nagios',
@@ -37,6 +46,21 @@
package { 'icinga2':
ensure => 'present',
+require => Apt::Repository['icinga2'],
+}
+
+package { 'icinga2-ido-mysql':
+ensure => 'present',
+require => [ Apt::Repository['icinga2'], Package['icinga2'] ],
+}
+
+file { '/etc/icinga2/features-available/ido-mysql.conf':
+ensure => present,
+content => template('icinga2/ido-mysql.erb'),
+owner => 'root',
+group => 'root',
+require => Package['icinga2-ido-mysql'],
+notify => Base::Service_unit['icinga2'],
}
file { '/etc/icinga2/conf.d/commands.conf':
diff --git a/manifests/plugins.pp b/manifests/plugins.pp
index 17fe054..9a312d2 100644
--- a/manifests/plugins.pp
+++ b/manifests/plugins.pp
@@ -5,6 +5,7 @@
package { 'nagios-nrpe-plugin':
ensure => present,
}
+
file { '/usr/lib/nagios':
ensure => directory,
owner => 'root',
diff --git a/manifests/web.pp b/manifests/web.pp
index 57f5a75..5cc53c2 100644
--- a/manifests/web.pp
+++ b/manifests/web.pp
@@ -14,30 +14,13 @@
$director_db_host = hiera('director_db_host'),
$director_db_name = hiera('director_db_name'),
$director_user_name = hiera('director_user_name'),
-$director_password = hiera('director_password')
+$director_password = hiera('director_password'),
) {
include ::icinga2
-if os_version('debian >= stretch') {
-