leapcode/leap_platform — pull request #28 by cz8s (2014-06-03 13:58:27+00:00)
Title: 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.