diff options
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/modules/site_config/manifests/hosts.pp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/puppet/modules/site_config/manifests/hosts.pp b/puppet/modules/site_config/manifests/hosts.pp index 1312f870..e3408b27 100644 --- a/puppet/modules/site_config/manifests/hosts.pp +++ b/puppet/modules/site_config/manifests/hosts.pp @@ -3,13 +3,15 @@ class site_config::hosts() { $hosts = hiera('hosts','') $hostname = hiera('name') - exec { "/bin/hostname $hostname": } - file { "/etc/hostname": ensure => present, content => $hostname } + exec { "/bin/hostname $hostname": + subscribe => [ File['/etc/hostname'], File['/etc/hosts'] ] + } + file { '/etc/hosts': content => template('site_config/hosts'), mode => '0644', owner => root, group => root; |