diff options
author | varac <varacanero@zeromail.org> | 2014-02-27 16:41:05 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-02-27 18:28:54 +0100 |
commit | 2887bbbac9f350c0912e3b2bf8fd643994eaee84 (patch) | |
tree | 24f8023f1d5a28a3ea15a152f48db62e53a55fb1 /puppet/modules | |
parent | 8882880d5959f14a7edb94ca95ebcdd15cbc3f51 (diff) |
include "127.0.1.1 @domain_public @api['domain']" in /etc/hosts for nagios webapp log check
Diffstat (limited to 'puppet/modules')
-rw-r--r-- | puppet/modules/site_config/manifests/hosts.pp | 1 | ||||
-rw-r--r-- | puppet/modules/site_config/templates/hosts | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/puppet/modules/site_config/manifests/hosts.pp b/puppet/modules/site_config/manifests/hosts.pp index a3ce0c1f..e5d4dd70 100644 --- a/puppet/modules/site_config/manifests/hosts.pp +++ b/puppet/modules/site_config/manifests/hosts.pp @@ -3,6 +3,7 @@ class site_config::hosts() { $hostname = hiera('name') $domain_hash = hiera('domain') $domain_public = $domain_hash['full_suffix'] + $api = hiera('api', '') file { '/etc/hostname': ensure => present, diff --git a/puppet/modules/site_config/templates/hosts b/puppet/modules/site_config/templates/hosts index c0a2740f..bfcabaa5 100644 --- a/puppet/modules/site_config/templates/hosts +++ b/puppet/modules/site_config/templates/hosts @@ -1,7 +1,8 @@ # This file is managed by puppet, any changes will be overwritten! 127.0.0.1 localhost -127.0.1.1 <%= @hostname %>.<%= @domain_public %> <%= @hostname %> +127.0.1.1 <%= @hostname %>.<%= @domain_public %> <%= @hostname %> <% if (defined? @services) and (@services.include? 'webapp') -%><%= @domain_public %> <%= @api['domain'] %><% end -%> + <%- if @hosts then -%> <% @hosts.keys.sort.each do |name| -%> |