How about this

This commit is contained in:
Kevin Fenzi 2014-07-23 23:15:10 +00:00
parent f36314fc7e
commit 44bf4608ca
3 changed files with 5 additions and 5 deletions

View file

@ -66,6 +66,6 @@
roles:
- { role: dhcp_server, when: datacenter == 'phx2' }
- { role: tftp_server, when: datacenter == 'phx2' }
- { role: nagios_server, srcdir: nagios, when: datacenter == 'phx2' }
- { role: nagios_server, srcdir: nagios-external, when: datacenter != 'phx2' }
- { role: nagios_server, nagios_srcdir: "nagios", when: datacenter == 'phx2' }
- { role: nagios_server, nagios_srcdir: "nagios-external", when: datacenter != 'phx2' }
- fedmsg/base

View file

@ -31,12 +31,12 @@
- mod_auth_openid
- name: Copy /etc/nagios config
synchronize: archive=yes src={{srcdir|string}}/ dest=/etc/nagios owner=nagios group=nagios
synchronize: archive=yes src={{nagios_srcdir}}/ dest=/etc/nagios owner=nagios group=nagios
tags:
- nagios-config
- name: Copy checkcommands.cfg
template: src={{srcdir}}/checkcommands.cfg dest=/etc/nagios/checkcommands.cfg owner=nagios group=nagios
template: src={{nagios_srcdir}}/checkcommands.cfg dest=/etc/nagios/checkcommands.cfg owner=nagios group=nagios
- name: Copy httpd config
template: src=nagios-httpd.conf dest=/etc/httpd/conf.d/nagios.conf

View file

@ -2,7 +2,7 @@
$cfg['cgi_config_file']='/etc/nagios/cgi.cfg'; // location of the CGI config file
$cfg['cgi_base_url']='/{{srcdir}}/cgi-bin/';
$cfg['cgi_base_url']='/{{nagios_srcdir}}/cgi-bin/';
// FILE LOCATION DEFAULTS
$cfg['main_config_file']='/etc/nagios/nagios.cfg'; // default location of the main Nagios config file