blob: a5f1b105da72274b9f21d3489486a9740cadfa00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
class site_config::hosts() {
$hosts = hiera('hosts','')
$hostname = hiera('name')
$domain_public = $site_config::domain_hash['full_suffix']
file { "/etc/hostname":
ensure => present,
content => $hostname
}
exec { "/bin/hostname $hostname":
subscribe => [ File['/etc/hostname'], File['/etc/hosts'] ],
refreshonly => true;
}
file { '/etc/hosts':
content => template('site_config/hosts'),
mode => '0644', owner => root, group => root;
}
}
|