Hi,
You need a class with a parameter.
e.g.
class profile::packages (
Array $pgk = {},
){
$pkg.each |$package| {
package { $package:
ensure => present,
}
}
And in hiera:
profile::packages::pkg:
- ‘htop’
- ‘less’
- ‘anyotherpackage’
Hth,
Martin
> On 26. Feb 2021, at 12:33, [email protected] <[email protected]> wrote:
>
> Hi all ,
>
> I want to manage software packages to get installed using hiera .
> If any one has any idea or code example , please help me with that .
>
> Regards,
> Nandha
>
> --
> 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 [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/8e788feb-76d0-4a30-866d-6587b8ef918fn%40googlegroups.com
>
> <https://groups.google.com/d/msgid/puppet-users/8e788feb-76d0-4a30-866d-6587b8ef918fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/2ED545BD-5322-4A2F-AA02-518B91C243AC%40gmail.com.