On 2016-15-02 8:37, Denny Schierz wrote:
hi,I try to get an if/case thing working, but I always get a syntax error. We have something like that for an user: modules/users/manifests/fbar.pp class users::fbar ( $ensure = present, $groups = [ 'develop' ] ) { case $ensure { present: { users::add_user { foobar: comment => 'Foo bar', uid => 1024, groups => $groups, shell => '/bin/bash', require => Group[$groups], } } absent: { users::del_user { ['fbar' ]: managehome => true, } } } } which is included on a node ... environments/dev/manifests/developpc.pp [...] # distribute users class { 'users::fbar': ensure => present, } The only thing I want, is to change the group on a special node with $hostname =~ /regex$/ I tried a lot to change from $groups = [ 'develop' ] to $groups = [ 'admins' ] with if/else and with case but ended up with syntax error on '}' ... expected ... (if i remember right). So, what I have done wrong ?
Impossible to guess when not seeing the entire failing example. - henrik -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blogspot.se/ -- 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/n9sje8%241up%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
