This does work though: class php::params { case $osmajor { '5': { $phpService = 'php53' $Modules = [ 'php-pecl-memcache', ] } default: { $phpService = 'php' $Modules = [ 'php-pecl-memcached', ] } } $phpVersion = 'latest' $phpModules = [ "${phpService}-mysql", "${phpService}-xml", "${phpService}-mbstring", "${phpService}-cli", "${phpService}-gd", "${phpService}-soap", $Modules, ] }
On Friday, 20 July 2012 08:58:15 UTC+1, Brett Maton wrote: > > > I'm trying to add elements to an array with the plusingment operator. > However the following results in > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Syntax error at '+>'; expected '}' at > /etc/puppet/modules/php/manifests/params.pp:17 > > (This isn't a question of whether or not php53 will be happy with > php-pecl-memcache, its about extending arrays). > > class php::params { > case $osmajor { > '5': { > $phpService = 'php53' > $phpModules = [ > 'php-pecl-memcache', > ] > } > default: { > $phpService = 'php' > $phpModules = [ > 'php-pecl-memcached', > ] > } > } > $phpVersion = 'latest' > $phpModules +> [ "${phpService}-mysql", > "${phpService}-xml", > "${phpService}-mbstring", > "${phpService}-cli", > "${phpService}-gd", > "${phpService}-soap", > ] > } > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/rpd4rOd-DYIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.