diff --git a/roles/nagios_server/files/nagios/commands/bzr.cfg b/roles/nagios_server/files/nagios/commands/bzr.cfg deleted file mode 100644 index f6dcaffa80..0000000000 --- a/roles/nagios_server/files/nagios/commands/bzr.cfg +++ /dev/null @@ -1,8 +0,0 @@ -# 'check_bzr' command definition -# I'd like this to actually interact with BZR, but I can't find any -# proper documentation on the protocol to craft send/expect/quit -# strings. -define command{ - command_name check_bzr - command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 4155 -} diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index a0159b1707..66d8f423f6 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -131,7 +131,6 @@ - name: Copy /etc/nagios/commands copy: src=nagios/commands/{{ item }} dest=/etc/nagios/commands/{{ item }} with_items: - - bzr.cfg - disk.cfg - dns.cfg - git.cfg diff --git a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 index e134ef4766..b3c435c661 100644 --- a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'bodhost' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/coloamer-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/coloamer-hosts.cfg.j2 index 95d95040a4..9f57973c2f 100644 --- a/roles/nagios_server/templates/nagios/hosts/coloamer-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/coloamer-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'coloamer' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 index 61abafd460..38e56da70c 100644 --- a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'dedicatedsolutions' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 index 24e651b0d9..8c80061f0c 100644 --- a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'host1plus' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 index 98a8529b41..2f7c20c3f6 100644 --- a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'ibiblio' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 index 5da2f6f338..f4edb6c96e 100644 --- a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'internetx' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 index 32dac93448..1d8b017011 100644 --- a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'osuosl' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 index c13478b7dd..c0cf73d3ce 100644 --- a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'rdu-cc' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2 index 78e17d694e..4f18f7712b 100644 --- a/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'rdu' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }} diff --git a/roles/nagios_server/templates/nagios/hosts/tummy-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/tummy-hosts.cfg.j2 index cc71044da1..cc5e6d7067 100644 --- a/roles/nagios_server/templates/nagios/hosts/tummy-hosts.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hosts/tummy-hosts.cfg.j2 @@ -1,7 +1,12 @@ {% for host in groups['all'] %} {% if hostvars[host].datacenter == 'tummy' %} define host { +{% if vars['nagios_location'] == 'internal' %} use defaulttemplate +{% else %} + use mincheck +{% endif %} + host_name {{ host }} {% if hostvars[host].ansible_hostname is defined %} alias {{ hostvars[host].ansible_hostname }}