Hi Arnau

On 10 Nov 2015, at 13:19, Arnau <listsar...@gmail.com> wrote:

> …

> in hiera defaults.yaml I've also defined a couple of nagios::client[1] 
> variables (for not including selinux):
> 
> $cat hieradb/defaults.yaml
> [...]
> 
> nagios
> ::client::selinux: 'false'
> 
> nagios
> ::client::selinux_enforced: 'false'
> [...]
> *Default for selinux is true.

Are your hiera data generic or specific to environments?

> …

> * Hiera works and returns the expected values:
> #  hiera -c /etc/puppet/hiera.yaml -d  classes environment=basic_conf 
> clientcert=XX

Here you make use of the ::environment.

> …

> My kickstart posinstall section runs puppet like:
> puppet agent --test --tags=kickstart::bootstrap --report --pluginsync 
> --no-noop 

Here you do not specify the environment.

> 
> I expect puppet to run, not include selinux and ONLY configure ntp
> But it gives me an error (failed catalog) because selinux::audit2allow is an 
> invlaid resource type. (which means that the nagios variables are not picked 
> up from hiera (false)  so selinux is included)
> If I reboot the node, and run the same exact puppet agent line, then puppet 
> runs (no selinux complain) and only NTP class is configured:
> #  /usr/bin/puppet agent --test --environment=basic_cb_conf 
> --tags=kickstart::bootstrap

Here you again use the environment.

Can you provide the content and location of your hiera.yaml file?


Best,
Martin

> …

> So, what are (or could be) the differences between puppet runs inside the 
> kickstart postinstall process and puppet runs outside it?
> Why is hiera ignored?
> 
> [1] (https://forge.puppetlabs.com/thias/nagios)
> 
> TIA,
> 
> -- 
> 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/CAM69jx_uAbfBc1aU0hYUv%3DGfkGu1oTCx%3D1%3DkgS1JUE1ifsxMxQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/05700C27-DDB2-49D6-B44B-3E0D12A609B1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to