From 2f9f76682c02770f47922435f815177ceec15fd9 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 3 Jun 2014 15:48:35 +0200 Subject: move hiera from site.pp to site_config::setup the problem was following: if a host has the webapp service, the template for /etc/hosts adds some stuff. But setup.pp did not ask hiera about the services so "/srv/leap/bin/puppet_command set_hostname" always resets the hostname. Since that gets triggered every time you run "leap deploy" the hostname changes, some services restart, then the hostname changes back and the services restart again. The solution is to get the hiera data before every run. --- puppet/modules/site_config/manifests/setup.pp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'puppet/modules/site_config/manifests/setup.pp') diff --git a/puppet/modules/site_config/manifests/setup.pp b/puppet/modules/site_config/manifests/setup.pp index 6d89be86..db22c4d9 100644 --- a/puppet/modules/site_config/manifests/setup.pp +++ b/puppet/modules/site_config/manifests/setup.pp @@ -13,6 +13,10 @@ class site_config::setup { include concat::setup include stdlib + + # parse services for host + $services=join(hiera_array('services', ['']), ' ') + notice("Services for ${fqdn}: ${services}") # configure /etc/hosts class { 'site_config::hosts': stage => setup, -- cgit v1.2.3