Multiple package install.

181 views
Skip to first unread message

Paul.S...@barcap.com

unread,
Aug 31, 2012, 3:46:49 AM8/31/12
to puppet...@googlegroups.com
Hello,
 
For the life of me I cannot get this to work. It's seemingly doable with a single class but outside....
 
params.pp:
class vmware::params {
  case $::lsbmajdistrelease {
    '4': {
      $packagelist = "[ 'vmware-tools-esx-kmods-smp', 'vmware-tools-esx-kmods-up' ]"
    }
    default: {
      $packagelist = 'vmware-tools-esx-kmods'
    }
  }
}
install.pp
  package { "$vmware::params::packagelist":
    ensure  => present,
  }
Which results in this:-
err: /Stage[main]/Vmware::Install/Package[['vmware-tools-esx-kmods-smp', 'vmware-tools-esx-kmods-up']]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install ['vmware-tools-esx-kmods-smp', 'vmware-tools-esx-kmods-up']' returned 1: Traceback (most recent call last):
 
I have tried escaping this in all sorts of crazy ways but not having a good deal of luck.
 
Anyone have the right way to do this ?
 
Cheers
Paul
 

David Schmitt

unread,
Aug 31, 2012, 3:59:38 AM8/31/12
to puppet...@googlegroups.com
On 2012-08-31 09:46, Olli...@googlemail.com wrote:
> Hello,
> For the life of me I cannot get this to work. It's seemingly doable with
> a single class but outside....
> params.pp:
> class vmware::params {
> case $::lsbmajdistrelease {
> '4': {
> $packagelist = "[ 'vmware-tools-esx-kmods-smp',
> 'vmware-tools-esx-kmods-up' ]"
> }
> default: {
> $packagelist = 'vmware-tools-esx-kmods'
> }
> }
> }
> install.pp
> package { "$vmware::params::packagelist":

Don't quote here. That converts the contents into a string.


D.

Paul.S...@barcap.com

unread,
Aug 31, 2012, 4:26:24 AM8/31/12
to puppet...@googlegroups.com
Thanks David, No matter what I try though it always seems to be passed through as a string rather than the array.

David Schmitt

unread,
Aug 31, 2012, 4:40:34 AM8/31/12
to puppet...@googlegroups.com
On 2012-08-31 10:26, Olli...@googlemail.com wrote:
>
> On Friday, August 31, 2012 9:00:34 AM UTC+1, David Schmitt wrote:
>
> On 2012-08-31 09:46, Olli...@googlemail.com <javascript:> wrote:
> > Hello,
> > For the life of me I cannot get this to work. It's seemingly
> doable with
> > a single class but outside....
> > params.pp:
> > class vmware::params {
> > case $::lsbmajdistrelease {
> > '4': {
> > $packagelist = "[ 'vmware-tools-esx-kmods-smp',
> > 'vmware-tools-esx-kmods-up' ]"


D'oh. here're quotes too! Missed them on the first round.

D.

> > }
> > default: {
> > $packagelist = 'vmware-tools-esx-kmods'
> > }
> > }
> > }
> > install.pp
> > package { "$vmware::params::packagelist":
>
> Don't quote here. That converts the contents into a string.
>
>
> D.
>
> Thanks David, No matter what I try though it always seems to be passed
> through as a string rather than the array.
>
> --
> 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/-/9VAY2vkfA7IJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

Paul.S...@barcap.com

unread,
Aug 31, 2012, 5:29:04 AM8/31/12
to puppet...@googlegroups.com

On Friday, August 31, 2012 9:41:28 AM UTC+1, David Schmitt wrote:
D'oh. here're quotes too! Missed them on the first round.

D.
 
Of course there is. Fixed it thanks. Coffee needed for me I think.
 
Cheers
Paul

Jakov Sosic

unread,
Aug 31, 2012, 2:54:57 PM8/31/12
to puppet...@googlegroups.com
On 08/31/2012 09:46 AM, Olli...@googlemail.com wrote:
> Hello,
> For the life of me I cannot get this to work. It's seemingly doable with
> a single class but outside....
> params.pp:
> class vmware::params {
> case $::lsbmajdistrelease {
> '4': {
> $packagelist = "[ 'vmware-tools-esx-kmods-smp',
> 'vmware-tools-esx-kmods-up' ]"
> }
> default: {
> $packagelist = 'vmware-tools-esx-kmods'
> }
> }
> }
> install.pp
> package { "$vmware::params::packagelist":
> ensure => present,
> }

Can you maybe provide SPEC files for those packages? I'm interested in
maintaining ESX tools packages in my company but didn't have time to
build RPM's nor did find any spec/srpms online...




--
Jakov Sosic
www.srce.unizg.hr

Darin Perusich

unread,
Aug 31, 2012, 3:07:38 PM8/31/12
to puppet...@googlegroups.com

Jakov Sosic

unread,
Aug 31, 2012, 3:49:38 PM8/31/12
to puppet...@googlegroups.com
On 08/31/2012 09:07 PM, Darin Perusich wrote:
> OBS has them.
>
> https://build.opensuse.org/package/show?package=open-vm-tools&project=Virtualization%3AVMware

Yeah but those are not ESX tools...


--
Jakov Sosic
www.srce.unizg.hr

J.W. Boerma

unread,
Aug 31, 2012, 5:27:36 PM8/31/12
to puppet...@googlegroups.com

Vmware has their own repositories:
packages.vmware.com

greetz
JW

Op 31 aug. 2012 21:49 schreef "Jakov Sosic" <jso...@srce.hr> het volgende:
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.

Jakov Sosic

unread,
Sep 2, 2012, 8:04:43 PM9/2/12
to puppet...@googlegroups.com
On 08/31/2012 11:27 PM, J.W. Boerma wrote:
> Vmware has their own repositories:
> packages.vmware.com <http://packages.vmware.com>

ty!!!


--
Jakov Sosic
www.srce.unizg.hr
Reply all
Reply to author
Forward
0 new messages