summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authormicah <micah@leap.se>2013-07-01 18:12:11 +0200
committermicah <micah@leap.se>2013-07-01 18:12:11 +0200
commitcf82d5831cbb0caf893340c97d4da4c02bfafda6 (patch)
treeeb1e643dffb67b196089fb5b9495b49600ea0fa0 /puppet
parenta2b1fc25dc363a99284711f67a2577f90fda6b14 (diff)
parent9a522267068a1bcede55ba388d526ddc263d155f (diff)
Merge branch 'bug/hosts_restart_stunnels' of /home/git/repositories/micah/leap_platform into develop
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_config/manifests/hosts.pp11
1 files changed, 11 insertions, 0 deletions
diff --git a/puppet/modules/site_config/manifests/hosts.pp b/puppet/modules/site_config/manifests/hosts.pp
index 83a1040d..ccedf036 100644
--- a/puppet/modules/site_config/manifests/hosts.pp
+++ b/puppet/modules/site_config/manifests/hosts.pp
@@ -14,6 +14,17 @@ class site_config::hosts() {
refreshonly => true;
}
+ # we depend on reliable hostnames from /etc/hosts for the stunnel services
+ # so restart stunnel service when /etc/hosts is modified
+ # because this is done in an early stage, the stunnel module may not
+ # have been deployed and will not be available for overriding, so
+ # this is handled in an unorthodox manner
+ exec { '/etc/init.d/stunnel4 restart':
+ subscribe => File['/etc/hosts'],
+ refreshonly => true,
+ onlyif => 'test -f /etc/init.d/stunnel4';
+ }
+
file { '/etc/hosts':
content => template('site_config/hosts'),
mode => '0644',