Hello guys :),

I'm kind of new to Puppet and stuck in defining a conditional statement. 
Here my problem:

I want to provide different apt/source.list for different versions of 
Debian, 6.0.x and 7.0.x, which also run different versions of Puppet, 2.7.x 
and 3.2.x. My first idea was to use facters variable 
operatingsystemmajrelease and define like this:

file { '/etc/apt/sources.list':
   source  => $operatingsystemmajrelease ? {
     6     => 'puppet:///modules/apt/sources.list_debian6',
     7     => 'puppet:///modules/apt/sources.list_debian7',
   },
   owner   => 'root',
   group   => 'root',
   mode    => '0644',
}

This works nice for Puppet 3.2.2, but this variable isn't available on the 
2.7.x hosts :/. Next idea, use the facter operatingsystemrelease variable, 
but I can't find a resource to describe something like:

if the $operatingsystemrelease is bigger/equal then 6.0.0 but smaller then 
7.0.0 then provide source.list.debian6
if else $operatingsystemrelease is bigger/equal 7.0.0 then provide 
source.list.debian7
else do nothing

Maybe someone can me point in the right direction, would be very nice :).

Cheers,
Szop

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to