Thank you very much, Guys. I've converted file to array using SED, but it 
is nice idea with hiera. I have never used hiera before, it was not 
necessary, but maybe it is time to start thinking in that direction.


On Wednesday, 18 March 2015 13:18:13 UTC, Garrett Honeycutt wrote:

> On 3/13/15 10:45 AM, Alex Miroshnik wrote: 
> > Hi Guys, 
> > 
> > I need to install multiple packages on the Ubuntu 14.0.4 using puppet. 
> > All packages are listed in the file (about 100 packages) one package 
> > name on the row. Is this possible? If it is possible, could you please 
> > give me a hint how to do this. 
> > I know  I can specify the array of the packages: 
> > 
> > $pkg_list = [ "pkg1", "pkg2", "pkg3" ] 
> > package { $pkg_list: ensure => "installed" } 
> > 
> > but this is not my case as I have quite a few packages in the list. 
> > 
> > Thank you in advance! 
> > 
>
> Hi Alex, 
>
> You could do this with my types module[1]. You would list all of the 
> packages in Hiera and then simply 'include types' on your node and all 
> of the packages you have listed would be installed. Here's a quick shell 
> script to format your list of packages into YAML[2]. 
>
> [1] - https://github.com/ghoneycutt/puppet-module-types#package 
> [2] - https://gist.github.com/ghoneycutt/03102b7f95f09bf45af9 
>
> Best regards, 
> -g 
>
> -- 
> Garrett Honeycutt 
> @learnpuppet 
> Puppet Training with LearnPuppet.com 
> Mobile: +1.206.414.8658 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a3246a1e-cb7f-43a8-b6ed-a15218a46dc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to