hi,

in the last 5 min I was able to solve my problem. The problem was that I 
wanted to override a parameterized class .. my solution is is now:

class users::fbar::params {

if ($::hostname =~ /^devpc21+(\d+)./) {
      $groups      = [ 'admin' ] }
else {

      $groups      = [ 'devel' ] }
}

class users::fbar (
      $ensure      = present,
      $groups      = $users::fbar::params::groups
)
      inherits  users::fbar::params

 {
   case $ensure {

      present: {
         users::add_user { fbar:
            comment                    => 'Foo Bar',
            uid                     => 1024,
            groups                  => $groups,
            shell                   => '/bin/bash',
            yubikeyid               => 'cccccxxxxxx',
            require                 => Group[ $groups ],
         }
      }
      absent: {
         users::del_user { ['fbar' ]:
            managehome  => true,
         }

      }
   }
}

It seems to be impossible to use if/case/whatever as selector for a 
parameter.

cu denny

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b9dbdb86-4f26-4a61-b23a-f64e797919bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to