Hello. Sometimes it is desirable to define Hiera variables for usage in
Hiera itself, i.e. variables that won't be looked up from Puppet manifests.
We do this to avoid repetition. Here's an example of a variable used only
in the file it is defined:
_internal_api_host: 'int.api.example.com'
Hi Molly,
We don't really run an unusual setup: just a regular machine with hostname
in local DNS available, no IPv6.
The installed Puppet component versions are as follows:
puppet-agent-7.4.1-1.el7.x86_64
puppet-client-tools-1.2.6-1.el7.x86_64
puppetdb-7.2.0-1.el7.noarch
puppetdb-termini-7.2.0-1
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:3
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