Puppet Class: hostname::systemd
- Defined in:
- manifests/systemd.pp
Overview
Definitions for systemd
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'manifests/systemd.pp', line 3
class hostname::systemd {
$local_hostname = $hostname::hostname
$local_domain = $hostname::domain
exec { 'set hostname':
command => "hostnamectl set-hostname ${local_hostname}",
unless => "test `hostnamectl --static` == '${local_hostname}'",
path => ['/usr/bin', '/bin'],
}
file { '/etc/hosts':
ensure => file,
content => template('hostname/etc_hosts.erb'),
}
}
|