I am trying to use an inherited  array parameter in a parameterized
class as follows:

<puppet>
class params{
  $packages = $operatingsystem ? {
    Centos => ['scons','bzip2'],
    Ubuntu => ['scons','bzip2'],
    # Ubuntu => 'scons',
  }
}

class depacks(
  $packages = "$params::packages"
) inherits params {

  package{ $packages:
    ensure => 'present',
  }
}

class {"depacks": }
</puppet>


* It's failing with following error:
<error>
err: /Stage[main]/Depacks/Package[sconsbzip2]/ensure: change from
purged to present failed: Execution of '/usr/bin/apt-get -q -y -o
DPkg::Options::=--force-confold install sconsbzip2' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
E: Couldn't find package sconsbzip2
</error>

* It works fine if I override the inherited array parameter while
calling/evaluating the class:
<puppet>
class {"depacks":
 packages => ['scons','bzip2'],
}
</puppet>

I am using Puppet 2.6.14 with Ruby 1.8.7. The error occurs on both
Ubuntu and CentOS systems.

Am I missing something here? Any pointers will be really helpful.

--
Thanks,
Shantanu

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.

Reply via email to