Ask Your Question
1

Install multiple packages [closed]

asked 2014-03-12 11:30:23 -0500

UBPClaw gravatar image

updated 2014-03-12 11:32:35 -0500

After upgrading to PE3.2 Ive lost my ability to install multiple packages with a single command using an array. When applying the manifest I now get an error saying "Name must be a string not array". So I convert the value to a string thinking it would work just like a normal package install (e.g. yum install -y pack1 pack2 pack3) but it says "returned 1: Error: Nothing to do" and the other manifests fail due to failed dependencies. I know I could just call out each package individually but I like being able to do it using ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by UBPClaw
close date 2014-03-12 15:14:17.156190

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-03-12 14:36:03 -0500

Stefan gravatar image

The ability to pass an array was never intended to worked and in fact only worked in some cases purely by accident. As a result this has been fixed in #22557 so you can only provide a string.

If you do not want to declare multiple resources explicitly, you can use the fact that puppet implicitly creates multiple resources with the same attributes if you pass an array as a title. So in your case

  package { $package_name:
    ensure => $package_ensure,
  }

should just work.

edit flag offensive delete link more

Comments

Thanks, that did it

UBPClaw gravatar imageUBPClaw ( 2014-03-12 15:13:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-12 11:30:23 -0500

Seen: 1,159 times

Last updated: Mar 12 '14