On Wed, Dec 15, 2010 at 17:45, Don Jackson <puppet-us...@clark-communications.com> wrote: > > My manifest includes this snippet > class app_client_openbsd { > $app_client_pkgs_obsd = [ 'glib2-2.24.1p2', 'gtar-1.23p1' ] > package { "${app_client_pkgs_obsd}": > ensure => 'installed', > source => > "http://${installserver}/openbsd/${operatingsystemrelease}/packages/${hardwaremodel}/${name}.tgz", > } > This doesn't work. > > debug: Puppet::Type::Package::ProviderOpenbsd: Executing '/usr/sbin/pkg_info > glib2-2.24.1p2gtar-1.23p1' > debug: /app_client_openbsd/Package[glib2-2.24.1p2gtar-1.23p1]: Changing > ensure > debug: //app_client_openbsd/Package[glib2-2.24.1p2gtar-1.23p1]: 1 change(s) > debug: Puppet::Type::Package::ProviderOpenbsd: Executing '/usr/sbin/pkg_add > http://svr.example.net/openbsd/4.8/packages/amd64/app_client_openbsd.tgz' > notice: //app_client_openbsd/Package[glib2-2.24.1p2gtar-1.23p1]/ensure: > created > > So why do the two strings of the two package names get smushed together > instead of being run separately?
Because the behaviour of puppet when an array is converted to a string is to concatenate. What you want is something like this: package { $array: ... } ...rather than... package { "$array": ... } I think you will then run into the issue that $name can't be expanded at that point, though, which would require writing an extra define to make it available. :( Regards, Daniel -- ✣ Daniel Pittman ✉ dan...@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.