Answer the question
In order to leave comments, you need to log in
Getting data from hiera in puppet manifets with foreman installed?
Can't get data from Hiera after installing foreman.
My config: Puppet Master 3.7.4 + Foreman 1.7 + Hiera 1.3.4
Hiera configs:
/etc/puppet/hiera.yaml
---
:backends:
- yaml
:hierarchy:
- "%{::environment}/node/%{::fqdn}" #node settings
- "%{::environment}/profile/%{calling_class}" # profile settings
- "%{::environment}/%{::environment}" # environment settings
- "%{::environment}/%{::osfamily}" # osfamily settings
- common # common settings
:yaml:
# datadir is empty here, so hiera uses its defaults:
# - /var/lib/hiera on *nix
# - %CommonAppData%\PuppetLabs\hiera\var on Windows
# When specifying a datadir, make sure the directory exists.
:datadir: '/etc/puppet/hiera'
profile::common::directory_hierarchy:
- "C:\\SiteName"
- "C:\\SiteName\\Config"
profile::common::system: "common"
profile::common::directory_hierarchy:
- "C:\\SiteName"
- "C:\\SiteName\\Config"
profile::common::system: "common"
class profile::common (
$directory_hierarchy =undef,
$system =undef
)
{
# $directory_hierarchy, $system, $share_directory
notify { "Dir is- $directory_hierarchy my fqdn is $fqdn, system = $system": }
}
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
privatekeydir = $ssldir/private_keys { group = service }
hostprivkey = $privatekeydir/$certname.pem { mode = 640 }
autosign = $confdir/autosign.conf { mode = 664 }
show_diff = false
hiera_config = $confdir/hiera.yaml
[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
default_schedules = false
report = true
pluginsync = true
masterport = 8140
environment = production
certname = puppet024.novalocal
server = puppet024.novalocal
listen = false
splay = false
splaylimit = 1800
runinterval = 1800
noop = false
configtimeout = 120
usecacheonfailure = true
[master]
autosign = $confdir/autosign.conf { mode = 664 }
reports = foreman
external_nodes = /etc/puppet/node.rb
node_terminus = exec
ca = true
ssldir = /var/lib/puppet/ssl
certname = puppet024.novalocal
strict_variables = false
environmentpath = /etc/puppet/environments
basemodulepath = /etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules
parser = future
Answer the question
In order to leave comments, you need to log in
As far as I understand, foreman needs a certain hier structure, and as an enc tool, it basically replaces hiera. I'm not sure, but it seems that external_nodes and node_terminus should be disabled, leaving foreman only for reports. And how to use it hybridly, I xs - you have to rummage through the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question