Shantanu
unread,Apr 12, 2012, 2:09:45 PM4/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
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