I have a longish list of packages defined as:
$packagelist = [
"autoconf",
"autogen",
"automake",
"autotools-dev",
"bison",
...]
They are installed with:
package { $packagelist:
alias => "wspkgs",
ensure => latest,
require => xxx
}
Puppet seems to declare the alias for each individual package, so I get
the following error:
info: /Package[xterm]: Adding aliases "wspkgs"
info: /Package[build-essential]: Adding aliases "wspkgs"
debug: Reraising build-essential can not create alias wspkgs: object
already exists
at /etc/puppet/modules/workstation/manifests/init.pp:121
I want to be able to do a "require => Package["wspkgs"]. How
can I achieve
that?
Thanks,
Keith
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Am 16.03.2009 um 13:28 schrieb Keith Edmunds:> > I have a longish list of packages defined as: > > $packagelist = [ > "autoconf", > "autogen", > "automake", > "autotools-dev", > "bison", > ...] > > They are installed with: > > package { $packagelist: > alias => "wspkgs", > ensure => latest, > require => xxx > } > > Puppet seems to declare the alias for each individual package, so I > get > the following error: > > info: /Package[xterm]: Adding aliases "wspkgs" > info: /Package[build-essential]: Adding aliases "wspkgs" > debug: Reraising build-essential can not create alias wspkgs: object > already exists > at /etc/puppet/modules/workstation/manifests/init.pp:121It does, as puppet will apply all 3 parameters (alias, ensure and require) to each and every entry in the array, which fails at the second element because the aiasl is already taken.> I want to be able to do a "require => Package["wspkgs"]. How can I > achieve > that?One way would be to put all this in a class and do a "require => Class["my_packages"]" or something like that, but I don''t think it''s very "puppety". I think the "prettier" way would be to add requires only as needed, and not on a loosely pieced together collection of packages. BR, Felix Schäfer --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Would require => Package[$packagelist] fit the bill ? Cheers Dave On 16/03/2009, at 11:28 PM, Keith Edmunds wrote:> I want to be able to do a "require => Package["wspkgs"]. How can I > achieve > that? > > Thanks, > Keith--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Am 16.03.2009 um 13:40 schrieb Dave Cheney:> Would require => Package[$packagelist] fit the bill ?Haven''t tried it, so take this with a grain of salt, but I''d wager you end with Package[["some", "software", "to", "install"]], which I don''t think puppet can parse. Mit freundlichen Grüßen, Felix Schäfer --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Mon, 16 Mar 2009, Felix Schäfer wrote:> Haven''t tried it, so take this with a grain of salt, but I''d wager you > end with Package[["some", "software", "to", "install"]], which I don''t > think puppet can parse.Would tags potentially give you what you needed? Can you install them by tag? Jason -- Jason Slagle - RHCE /"\ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \ / ASCII Ribbon Campaign . X - NO HTML/RTF in e-mail . / \ - NO Word docs in e-mail . --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Works for me
case $operatingsystem {
default: {$ssh_packages = ["openssh-server",
"openssh-
clients"] }
}
package { $ssh_packages: ensure => installed }
service { sshd:
name => $operatingsystem ? {
default => "sshd"
},
enable => true,
ensure => running,
require => Package[$ssh_packages]
}
Cheers
Dave
On 17/03/2009, at 12:03 AM, Felix Schäfer wrote:
>
> Am 16.03.2009 um 13:40 schrieb Dave Cheney:
>
>> Would require => Package[$packagelist] fit the bill ?
>
> Haven''t tried it, so take this with a grain of salt, but
I''d wager you
> end with Package[["some", "software", "to",
"install"]], which I don''t
> think puppet can parse.
>
> Mit freundlichen Grüßen,
>
> Felix Schäfer
> >
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---