1
0
Fork 0
puppet-walkthru/manifests/8-independent-example.pp

33 lines
571 B
ObjectPascal
Raw Normal View History

2013-12-02 21:15:11 -05:00
case $::osfamily {
'RedHat': {
$service = 'ntpd'
$conf = 'ntp.conf.redhat'
}
'Debian': {
$service = 'ntp'
$conf = 'ntp.conf.debian'
}
}
notify { 'OS Information':
message => "${::osfamily}: Setting service to ${service} and conf to ${conf}",
before => Package['ntp'],
}
package { 'ntp':
ensure => present,
}
file { '/etc/ntp.conf':
ensure => present,
require => Package['ntp'],
source => "/vagrant/files/${conf}",
}
service { $service:
ensure => running,
enable => true,
subscribe => File['/etc/ntp.conf'],
}