From e71e7080e403c6bcacb7305b5764d305e314e03d Mon Sep 17 00:00:00 2001 From: Antoine Beaupre Date: Fri, 9 Apr 2010 17:21:08 -0400 Subject: proper apache bootstrap --- manifests/apache.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/apache.pp b/manifests/apache.pp index 36994f8..c00b1d9 100644 --- a/manifests/apache.pp +++ b/manifests/apache.pp @@ -1,4 +1,4 @@ -class nagios::apache { +class nagios::apache inherits ::apache { $nagios_httpd = 'apache' include nagios } -- cgit v1.2.3 From a39602b3a60d723c8cea26a76e26c753e22ca655 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 28 Jun 2010 20:52:37 +0200 Subject: require parent dir for nagios resources --- manifests/base.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index 6106ab2..fa9f98a 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -84,50 +84,62 @@ class nagios::base { Nagios_command <||> { target => "${nagios_cfgdir}/conf.d/nagios_command.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_contact <||> { target => "${nagios_cfgdir}/conf.d/nagios_contact.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_contactgroup <||> { target => "${nagios_cfgdir}/conf.d/nagios_contactgroup.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_host <||> { target => "${nagios_cfgdir}/conf.d/nagios_host.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostextinfo <||> { target => "${nagios_cfgdir}/conf.d/nagios_hostextinfo.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostgroup <||> { target => "${nagios_cfgdir}/conf.d/nagios_hostgroup.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostgroupescalation <||> { target => "${nagios_cfgdir}/conf.d/nagios_hostgroupescalation.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_service <||> { target => "${nagios_cfgdir}/conf.d/nagios_service.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_servicedependency <||> { target => "${nagios_cfgdir}/conf.d/nagios_servicedependency.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_serviceescalation <||> { target => "${nagios_cfgdir}/conf.d/nagios_serviceescalation.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_serviceextinfo <||> { target => "${nagios_cfgdir}/conf.d/nagios_serviceextinfo.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } Nagios_timeperiod <||> { target => "${nagios_cfgdir}/conf.d/nagios_timeperiod.cfg", + require => File['nagios_confd'], notify => Service['nagios'], } -- cgit v1.2.3 From a05aded859c11181a60db71f852ed59260a08a97 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 28 Jun 2010 21:19:02 +0200 Subject: whitespace cleanup --- manifests/defaults/hostgroups.pp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'manifests') diff --git a/manifests/defaults/hostgroups.pp b/manifests/defaults/hostgroups.pp index 3a4f4d1..8715ade 100644 --- a/manifests/defaults/hostgroups.pp +++ b/manifests/defaults/hostgroups.pp @@ -1,13 +1,11 @@ class nagios::defaults::hostgroups { - - nagios_hostgroup { - 'all': - alias => 'All Servers', - members => '*'; - 'debian-servers': - alias => 'Debian GNU/Linux Servers'; - 'centos-servers': - alias => 'CentOS GNU/Linux Servers'; - } - + nagios_hostgroup { + 'all': + alias => 'All Servers', + members => '*'; + 'debian-servers': + alias => 'Debian GNU/Linux Servers'; + 'centos-servers': + alias => 'CentOS GNU/Linux Servers'; + } } -- cgit v1.2.3 From 4380d21e663fd14f42e89df74131d3d5384b89b8 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 28 Jun 2010 21:23:27 +0200 Subject: whitespace issue --- manifests/defaults/host_templates.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests') diff --git a/manifests/defaults/host_templates.pp b/manifests/defaults/host_templates.pp index 699b965..0f47324 100644 --- a/manifests/defaults/host_templates.pp +++ b/manifests/defaults/host_templates.pp @@ -12,12 +12,12 @@ class nagios::defaults::host_templates { process_perf_data => '1', retain_status_information => '1', retain_nonstatus_information => '1', - check_command => 'check-host-alive', - max_check_attempts => '10', - notification_interval => '0', - notification_period => '24x7', - notification_options => 'd,u,r', - contact_groups => 'admins', + check_command => 'check-host-alive', + max_check_attempts => '10', + notification_interval => '0', + notification_period => '24x7', + notification_options => 'd,u,r', + contact_groups => 'admins', register => '0', } -- cgit v1.2.3 From 5a138b57821288d02e58a5f59bd45ce918ab797a Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 28 Jun 2010 22:10:20 +0200 Subject: some whitespace --- manifests/defaults/service_templates.pp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'manifests') diff --git a/manifests/defaults/service_templates.pp b/manifests/defaults/service_templates.pp index 326ce05..84740af 100644 --- a/manifests/defaults/service_templates.pp +++ b/manifests/defaults/service_templates.pp @@ -17,15 +17,15 @@ class nagios::defaults::service_templates { process_perf_data => '1', retain_status_information => '1', retain_nonstatus_information => '1', - notification_interval => '0', - is_volatile => '0', - check_period => '24x7', - normal_check_interval => '5', - retry_check_interval => '1', - max_check_attempts => '4', - notification_period => '24x7', - notification_options => 'w,u,c,r', - contact_groups => 'admins', + notification_interval => '0', + is_volatile => '0', + check_period => '24x7', + normal_check_interval => '5', + retry_check_interval => '1', + max_check_attempts => '4', + notification_period => '24x7', + notification_options => 'w,u,c,r', + contact_groups => 'admins', register => '0', } -- cgit v1.2.3 From 99b97c407f448e2a1d0d5f4cabda4b78f05d4753 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 28 Jun 2010 22:34:30 +0200 Subject: adjust plugin stuff, so we can remotely specify new plugins --- manifests/base.pp | 1 + manifests/plugin.pp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index fa9f98a..e3c9c43 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -81,6 +81,7 @@ class nagios::base { Nagios_serviceescalation <<||>> Nagios_serviceextinfo <<||>> Nagios_timeperiod <<||>> + Nagios::Plugin <<||>> Nagios_command <||> { target => "${nagios_cfgdir}/conf.d/nagios_command.cfg", diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 4789345..85ef4b1 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -1,4 +1,5 @@ define nagios::plugin( + $source = 'absent', $ensure = present ){ file{$name: @@ -7,7 +8,10 @@ define nagios::plugin( default => "/usr/lib/nagios/plugins/$name", }, ensure => $ensure, - source => "puppet://$server/modules/nagios/plugins/$name", + source => $source ? { + 'absent' => "puppet://$server/modules/nagios/plugins/$name", + default => "puppet://$server/modules/$source" + }, require => Package['nagios-plugins'], owner => root, group => 0, mode => 0755; } -- cgit v1.2.3 From 5761d798995156ab89f3e6dad01daa9ba1fb66ff Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Jun 2010 06:42:01 +0200 Subject: workaround puppet bug --- manifests/base.pp | 2 +- manifests/plugin.pp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index e3c9c43..47ef9f3 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -81,7 +81,7 @@ class nagios::base { Nagios_serviceescalation <<||>> Nagios_serviceextinfo <<||>> Nagios_timeperiod <<||>> - Nagios::Plugin <<||>> + File <<| tag == 'nagios_plugin' |>> Nagios_command <||> { target => "${nagios_cfgdir}/conf.d/nagios_command.cfg", diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 85ef4b1..b001810 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -2,7 +2,7 @@ define nagios::plugin( $source = 'absent', $ensure = present ){ - file{$name: + @@file{$name: path => $hardwaremodel ? { 'x86_64' => "/usr/lib64/nagios/plugins/$name", default => "/usr/lib/nagios/plugins/$name", @@ -12,6 +12,7 @@ define nagios::plugin( 'absent' => "puppet://$server/modules/nagios/plugins/$name", default => "puppet://$server/modules/$source" }, + tag => 'nagios_plugin', require => Package['nagios-plugins'], owner => root, group => 0, mode => 0755; } -- cgit v1.2.3 From cdcc346bd6af7fc54fa7e3b0349d920774add0cc Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 1 Jul 2010 04:29:15 +0200 Subject: use proper check cmd name --- manifests/defaults/commands.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/defaults/commands.pp b/manifests/defaults/commands.pp index 05460f5..bbb6ce5 100644 --- a/manifests/defaults/commands.pp +++ b/manifests/defaults/commands.pp @@ -49,7 +49,7 @@ class nagios::defaults::commands { command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -e'; check_ssh: command_line => '$USER1$/check_ssh $HOSTADDRESS$'; - check_ssh_port: + ssh_port: command_line => '$USER1$/check_ssh -p $ARG1$ $HOSTADDRESS$'; check_http: command_line => '$USER1$/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$'; -- cgit v1.2.3 From 137cfda388841f242f51ce1e38ec37cf7a6407d9 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 1 Jul 2010 05:02:42 +0200 Subject: fix variable lookup and allow outside setting --- manifests/base.pp | 64 +++++++++++++++++++++-------------------- manifests/debian.pp | 2 +- manifests/defaults/templates.pp | 3 +- manifests/defaults/vars.pp | 10 +++++++ 4 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 manifests/defaults/vars.pp (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index d609196..e01b111 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,4 +1,6 @@ class nagios::base { + # include the variables + include nagios::defaults::vars package { 'nagios': alias => 'nagios', @@ -14,7 +16,7 @@ class nagios::base { # this file should contain all the nagios_puppet-paths: file { 'nagios_main_cfg': - path => "${nagios_cfgdir}/nagios.cfg", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/nagios.cfg", source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios.cfg", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios.cfg", "puppet://$server/modules/site-nagios/configs/nagios.cfg", @@ -25,7 +27,7 @@ class nagios::base { } file { 'nagios_cgi_cfg': - path => "${nagios_cfgdir}/cgi.cfg", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/cgi.cfg", source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/cgi.cfg", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/cgi.cfg", "puppet://$server/modules/site-nagios/configs/cgi.cfg", @@ -36,14 +38,14 @@ class nagios::base { } file { 'nagios_htpasswd': - path => "${nagios_cfgdir}/htpasswd.users", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/htpasswd.users", source => [ "puppet://$server/modules/site-nagios/htpasswd.users", "puppet://$server/modules/nagios/htpasswd.users" ], mode => 0640, owner => root, group => apache; } file { 'nagios_private': - path => "${nagios_cfgdir}/private/", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/private/", source => "puppet://$server/modules/common/empty", ensure => directory, purge => true, @@ -53,7 +55,7 @@ class nagios::base { } file { 'nagios_private_resource_cfg': - path => "${nagios_cfgdir}/private/resource.cfg", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/private/resource.cfg", source => [ "puppet://$server/modules/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}" ], notify => Service['nagios'], @@ -61,7 +63,7 @@ class nagios::base { } file { 'nagios_confd': - path => "${nagios_cfgdir}/conf.d/", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/", source => "puppet://$server/modules/common/empty", ensure => directory, purge => true, @@ -85,78 +87,78 @@ class nagios::base { File <<| tag == 'nagios_plugin' |>> Nagios_command <||> { - target => "${nagios_cfgdir}/conf.d/nagios_command.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_command.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_contact <||> { - target => "${nagios_cfgdir}/conf.d/nagios_contact.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_contact.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_contactgroup <||> { - target => "${nagios_cfgdir}/conf.d/nagios_contactgroup.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_contactgroup.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_host <||> { - target => "${nagios_cfgdir}/conf.d/nagios_host.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_host.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostextinfo <||> { - target => "${nagios_cfgdir}/conf.d/nagios_hostextinfo.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostextinfo.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostgroup <||> { - target => "${nagios_cfgdir}/conf.d/nagios_hostgroup.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostgroup.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_hostgroupescalation <||> { - target => "${nagios_cfgdir}/conf.d/nagios_hostgroupescalation.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostgroupescalation.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_service <||> { - target => "${nagios_cfgdir}/conf.d/nagios_service.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_service.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_servicedependency <||> { - target => "${nagios_cfgdir}/conf.d/nagios_servicedependency.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_servicedependency.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_serviceescalation <||> { - target => "${nagios_cfgdir}/conf.d/nagios_serviceescalation.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_serviceescalation.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_serviceextinfo <||> { - target => "${nagios_cfgdir}/conf.d/nagios_serviceextinfo.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_serviceextinfo.cfg", require => File['nagios_confd'], notify => Service['nagios'], } Nagios_timeperiod <||> { - target => "${nagios_cfgdir}/conf.d/nagios_timeperiod.cfg", + target => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_timeperiod.cfg", require => File['nagios_confd'], notify => Service['nagios'], } - file{[ "${nagios_cfgdir}/conf.d/nagios_command.cfg", - "${nagios_cfgdir}/conf.d/nagios_contact.cfg", - "${nagios_cfgdir}/conf.d/nagios_contactgroup.cfg", - "${nagios_cfgdir}/conf.d/nagios_host.cfg", - "${nagios_cfgdir}/conf.d/nagios_hostextinfo.cfg", - "${nagios_cfgdir}/conf.d/nagios_hostgroup.cfg", - "${nagios_cfgdir}/conf.d/nagios_hostgroupescalation.cfg", - "${nagios_cfgdir}/conf.d/nagios_service.cfg", - "${nagios_cfgdir}/conf.d/nagios_servicedependency.cfg", - "${nagios_cfgdir}/conf.d/nagios_serviceescalation.cfg", - "${nagios_cfgdir}/conf.d/nagios_serviceextinfo.cfg", - "${nagios_cfgdir}/conf.d/nagios_timeperiod.cfg" ]: + file{[ "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_command.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_contact.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_contactgroup.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_host.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostextinfo.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostgroup.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_hostgroupescalation.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_service.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_servicedependency.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_serviceescalation.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_serviceextinfo.cfg", + "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_timeperiod.cfg" ]: ensure => file, replace => false, notify => Service['nagios'], @@ -166,7 +168,7 @@ class nagios::base { # manage nagios cfg files # must be defined after exported resource overrides and cfg file defs file { 'nagios_cfgdir': - path => "${nagios_cfgdir}/", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/", source => "puppet://$server/modules/common/empty", ensure => directory, recurse => true, diff --git a/manifests/debian.pp b/manifests/debian.pp index a503324..b9e87ec 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -14,7 +14,7 @@ class nagios::debian inherits nagios::base { File['nagios_htpasswd', 'nagios_cgi_cfg'] { group => 'www-data' } - file { "${nagios_cfgdir}/stylesheets": + file { "${nagios::defaults::vars::int_nagios_cfgdir}/stylesheets": ensure => directory, purge => false, recurse => true, diff --git a/manifests/defaults/templates.pp b/manifests/defaults/templates.pp index 752ba60..bf8a6cf 100644 --- a/manifests/defaults/templates.pp +++ b/manifests/defaults/templates.pp @@ -1,7 +1,8 @@ class nagios::defaults::templates { + include nagios::defaults::vars file { 'nagios_templates': - path => "${nagios_cfgdir}/conf.d/nagios_templates.cfg", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_templates.cfg", source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/nagios_templates.cfg", diff --git a/manifests/defaults/vars.pp b/manifests/defaults/vars.pp new file mode 100644 index 0000000..6302f13 --- /dev/null +++ b/manifests/defaults/vars.pp @@ -0,0 +1,10 @@ +class nagios::defaults::vars { + case $nagios_cfgdir { + '': { $int_nagios_cfgdir = $operatingsystem ? { + centos => '/etc/nagios/', + default => '/etc/nagios3' + } + } + default: { $int_nagios_cfgdir = $nagios_cfgdir } + } +} -- cgit v1.2.3 From a5d8b5b8b1f4d5afcb549e28bf1eef12169b81c7 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 7 Aug 2010 02:12:20 +0200 Subject: remove unnecessary fileserver variable (#2460) --- manifests/base.pp | 34 +++++++++++++++++----------------- manifests/defaults/templates.pp | 10 +++++----- manifests/plugin.pp | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index e01b111..071f22c 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -17,36 +17,36 @@ class nagios::base { # this file should contain all the nagios_puppet-paths: file { 'nagios_main_cfg': path => "${nagios::defaults::vars::int_nagios_cfgdir}/nagios.cfg", - source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios.cfg", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios.cfg", - "puppet://$server/modules/site-nagios/configs/nagios.cfg", - "puppet://$server/modules/nagios/configs/${operatingsystem}/nagios.cfg", - "puppet://$server/modules/nagios/configs/nagios.cfg" ], + source => [ "puppet:///modules/site-nagios/configs/${fqdn}/nagios.cfg", + "puppet:///modules/site-nagios/configs/${operatingsystem}/nagios.cfg", + "puppet:///modules/site-nagios/configs/nagios.cfg", + "puppet:///modules/nagios/configs/${operatingsystem}/nagios.cfg", + "puppet:///modules/nagios/configs/nagios.cfg" ], notify => Service['nagios'], mode => 0644, owner => root, group => root; } file { 'nagios_cgi_cfg': path => "${nagios::defaults::vars::int_nagios_cfgdir}/cgi.cfg", - source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/cgi.cfg", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/cgi.cfg", - "puppet://$server/modules/site-nagios/configs/cgi.cfg", - "puppet://$server/modules/nagios/configs/${operatingsystem}/cgi.cfg", - "puppet://$server/modules/nagios/configs/cgi.cfg" ], + source => [ "puppet:///modules/site-nagios/configs/${fqdn}/cgi.cfg", + "puppet:///modules/site-nagios/configs/${operatingsystem}/cgi.cfg", + "puppet:///modules/site-nagios/configs/cgi.cfg", + "puppet:///modules/nagios/configs/${operatingsystem}/cgi.cfg", + "puppet:///modules/nagios/configs/cgi.cfg" ], mode => '0644', owner => 'root', group => 0, notify => Service['apache'], } file { 'nagios_htpasswd': path => "${nagios::defaults::vars::int_nagios_cfgdir}/htpasswd.users", - source => [ "puppet://$server/modules/site-nagios/htpasswd.users", - "puppet://$server/modules/nagios/htpasswd.users" ], + source => [ "puppet:///modules/site-nagios/htpasswd.users", + "puppet:///modules/nagios/htpasswd.users" ], mode => 0640, owner => root, group => apache; } file { 'nagios_private': path => "${nagios::defaults::vars::int_nagios_cfgdir}/private/", - source => "puppet://$server/modules/common/empty", + source => "puppet:///modules/common/empty", ensure => directory, purge => true, recurse => true, @@ -56,15 +56,15 @@ class nagios::base { file { 'nagios_private_resource_cfg': path => "${nagios::defaults::vars::int_nagios_cfgdir}/private/resource.cfg", - source => [ "puppet://$server/modules/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}" ], + source => [ "puppet:///modules/nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}", + "puppet:///modules/site-nagios/configs/${operatingsystem}/private/resource.cfg.${architecture}" ], notify => Service['nagios'], owner => root, group => nagios, mode => '0640'; } file { 'nagios_confd': path => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/", - source => "puppet://$server/modules/common/empty", + source => "puppet:///modules/common/empty", ensure => directory, purge => true, recurse => true, @@ -169,7 +169,7 @@ class nagios::base { # must be defined after exported resource overrides and cfg file defs file { 'nagios_cfgdir': path => "${nagios::defaults::vars::int_nagios_cfgdir}/", - source => "puppet://$server/modules/common/empty", + source => "puppet:///modules/common/empty", ensure => directory, recurse => true, purge => true, diff --git a/manifests/defaults/templates.pp b/manifests/defaults/templates.pp index bf8a6cf..c97eee4 100644 --- a/manifests/defaults/templates.pp +++ b/manifests/defaults/templates.pp @@ -3,11 +3,11 @@ class nagios::defaults::templates { file { 'nagios_templates': path => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_templates.cfg", - source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios_templates.cfg", - "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios_templates.cfg", - "puppet://$server/modules/site-nagios/configs/nagios_templates.cfg", - "puppet://$server/modules/nagios/configs/${operatingsystem}/nagios_templates.cfg", - "puppet://$server/modules/nagios/configs/nagios_templates.cfg" ], + source => [ "puppet:///modules/site-nagios/configs/${fqdn}/nagios_templates.cfg", + "puppet:///modules/site-nagios/configs/${operatingsystem}/nagios_templates.cfg", + "puppet:///modules/site-nagios/configs/nagios_templates.cfg", + "puppet:///modules/nagios/configs/${operatingsystem}/nagios_templates.cfg", + "puppet:///modules/nagios/configs/nagios_templates.cfg" ], notify => Service['nagios'], mode => 0644, owner => root, group => root; } diff --git a/manifests/plugin.pp b/manifests/plugin.pp index b001810..abaa6e5 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -9,8 +9,8 @@ define nagios::plugin( }, ensure => $ensure, source => $source ? { - 'absent' => "puppet://$server/modules/nagios/plugins/$name", - default => "puppet://$server/modules/$source" + 'absent' => "puppet:///modules/nagios/plugins/$name", + default => "puppet:///modules/$source" }, tag => 'nagios_plugin', require => Package['nagios-plugins'], -- cgit v1.2.3 From 25e0862d29da6b99b1195942cc994780fbbf68ab Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 11 Aug 2010 15:58:07 +0200 Subject: remove unnecessary fileserver variable (#2460) round II --- manifests/nsca/client.pp | 6 +++--- manifests/nsca/server.pp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'manifests') diff --git a/manifests/nsca/client.pp b/manifests/nsca/client.pp index 5314b3d..6e2c472 100644 --- a/manifests/nsca/client.pp +++ b/manifests/nsca/client.pp @@ -3,9 +3,9 @@ class nagios::nsca::client { package { 'nsca': ensure => installed } file { '/etc/send_nsca.cfg': - source => [ "puppet://${server}/modules/site-nagios/nsca/{$fqdn}/send_nsca.cfg", - "puppet://${server}/modules/site-nagios/nsca/send_nsca.cfg", - "puppet://${server}/modules/nagios/nsca/send_nsca.cfg" ], + source => [ "puppet:///modules/site-nagios/nsca/{$fqdn}/send_nsca.cfg", + "puppet:///modules/site-nagios/nsca/send_nsca.cfg", + "puppet:///modules/nagios/nsca/send_nsca.cfg" ], owner => 'nagios', group => 'nogroup', mode => '400', diff --git a/manifests/nsca/server.pp b/manifests/nsca/server.pp index e1cb83c..9239f21 100644 --- a/manifests/nsca/server.pp +++ b/manifests/nsca/server.pp @@ -9,9 +9,9 @@ class nagios::nsca::server { } file { '/etc/nsca.cfg': - source => [ "puppet://${server}/modules/site-nagios/nsca/{$fqdn}/nsca.cfg", - "puppet://${server}/modules/site-nagios/nsca/nsca.cfg", - "puppet://${server}/modules/nagios/nsca/nsca.cfg" ], + source => [ "puppet:///modules/site-nagios/nsca/{$fqdn}/nsca.cfg", + "puppet:///modules/site-nagios/nsca/nsca.cfg", + "puppet:///modules/nagios/nsca/nsca.cfg" ], owner => 'nagios', group => 'nogroup', mode => '400', -- cgit v1.2.3