[Puppet Users] Re: split config by $lsbdistid

Joshua Timberman
Tue, 07 Oct 2008 14:33:12 -0000

On Tue, Oct 7, 2008 at 7:41 AM, Mike Renfro <renfro@tntech.edu>
wrote:
>
> Recent versions of facter on Ubuntu may return "Ubuntu" for the
> operatingsystem fact instead of "Debian".


$ facter facterversion lsbdistid
facterversion => 1.3.8
lsbdistid => Ubuntu


I think only case statements can take multiple values though, so:

case $lsbdistid {
  Debian, Ubuntu: { $ntp_file_source
"puppet:///ntp/ntp.conf.${lsbdistid}-${lsbdistcodename}",
  Solaris: { $ntp_file_source = "puppet:///ntp/ntp.conf.Solaris" }
}

file { ntpconf:
...
  source => "$ntp_file_source",
...
}