I'm trying to get something like this to work in my Puppet manifest:
if $hostname == 'host1' || $hostname == 'host2' {
# Modified config.txt for portrait mode.
file { '/boot/config.txt' :
ensure => present,
mode => '0755',
source => 'puppet://puppet/files/boot/config.txt.portrait',
}
} else {
# Normal config.txt for landscape mode.
file { '/boot/config.txt' :
ensure => present,
mode => '0755',
source => 'puppet://puppet/files/boot/config.txt.landscape',
}
}
However, this fails. What is the best way to, depending on the hostname, to include different files?