summaryrefslogtreecommitdiff
path: root/puppet/modules/site_nagios/manifests/server
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2014-02-12 16:26:59 +0100
committervarac <varacanero@zeromail.org>2014-02-12 16:26:59 +0100
commitefc3e3eaa0788271cf61155d7e9be4d46e6e9d47 (patch)
tree2378b96bb9d412e46aac481937b1a99f3844dd48 /puppet/modules/site_nagios/manifests/server
parente81455708e70a46dbb4fefbd510e4e354ce9606c (diff)
moved check_mk server and client class to site_check_mk module
Diffstat (limited to 'puppet/modules/site_nagios/manifests/server')
-rw-r--r--puppet/modules/site_nagios/manifests/server/check_mk.pp48
1 files changed, 0 insertions, 48 deletions
diff --git a/puppet/modules/site_nagios/manifests/server/check_mk.pp b/puppet/modules/site_nagios/manifests/server/check_mk.pp
deleted file mode 100644
index f0fd3a76..00000000
--- a/puppet/modules/site_nagios/manifests/server/check_mk.pp
+++ /dev/null
@@ -1,48 +0,0 @@
-class site_nagios::server::check_mk {
-
- $ssh_hash = hiera('ssh')
- $pubkey = $ssh_hash['authorized_keys']['monitor']['key']
- $type = $ssh_hash['authorized_keys']['monitor']['type']
- $seckey = $ssh_hash['monitor']['private_key']
- $ssh_port = $ssh_hash['port']
-
- $nagios_hiera = hiera_hash('nagios')
- $hosts = $nagios_hiera['hosts']
- $all_hosts = inline_template("<% @hosts.keys.sort.each do |key| -%>\"<%= key %>\", <% end -%>")
-
- package { 'check-mk-server':
- ensure => installed,
- }
-
- # override paths to use the system check_mk rather than OMD
- class { 'check_mk::config':
- site => '',
- etc_dir => '/etc',
- nagios_subdir => 'nagios3',
- bin_dir => '/usr/bin',
- host_groups => undef,
- require => Package['check-mk-server']
- }
-
- Exec['check_mk-reload'] -> Service['nagios']
-
- file {
- '/etc/check_mk/conf.d/use_ssh.mk':
- content => template('site_check_mk/use_ssh.mk'),
- notify => Exec['check_mk-refresh'];
- '/etc/check_mk/all_hosts_static':
- content => $all_hosts,
- notify => Exec['check_mk-refresh'];
- '/etc/check_mk/.ssh':
- ensure => directory;
- '/etc/check_mk/.ssh/id_rsa':
- content => $seckey,
- owner => 'nagios',
- mode => '0600';
- '/etc/check_mk/.ssh/id_rsa.pub':
- content => "${type} ${pubkey} monitor",
- owner => 'nagios',
- mode => '0644';
- }
-
-}