2015-11-10 14:39 GMT+01:00 Martin Alfke <[email protected]>:

> Hi Arnau
>
Hi Martin,


> Are your hiera data generic or specific to environments?
>

specific to hiera.


> > …
>
> > * 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.
>

Yes, because the default environment is not "basic_conf" .



> > 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've tried to run the puppet command + --environment=basic_conf inside the
kickstart process and it still gives me the error. I should have pasted the
complete command and not this one. Sorry.


The reason why I specify the environment is becasue the default env in the
puppet master is not basic_conf. The node env  (AND ONLY NODE ENV) is
defined in foreman. (yes, maybe I should have talked about foreman before,
but, as the same command with/without environment fails, I did not consider
that foreman was interefering with my current issue).



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

 # cat /etc/puppet/hiera.yaml
---
:backend:
  - yaml
:hierarchy:
  - "%{environment}/hieradb/global"
  - "%{environment}/hieradb/cert/%{clientcert}"
  - "%{environment}/hieradb/net/%{netlocation}"
  - "%{environment}/hieradb/location/%{location}"
  - "%{environment}/hieradb/env/%{environment}"
  -
"%{environment}/hieradb/dist/%{operatingsystem}/%{operatingsystemrelease}"
  -
"%{environment}/hieradb/dist/%{operatingsystem}/%{operatingsystemmajrelease}"
  - "%{environment}/hieradb/dist/%{operatingsystem}"
  - "%{environment}/hieradb/dist/%{lsbdistid}/%{lsbdistrelease}"
  - "%{environment}/hieradb/dist/%{lsbdistid}/%{lsbmajdistrelease}"
  - "%{environment}/hieradb/dist/%{lsbdistid}"
  - "%{environment}/hieradb/defaults"

:yaml:
  :datadir: "/var/lib/puppet-deploy/XX-environments"



>
> Best,
> Martin


Cheers,
Arnau

-- 
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/CAM69jx-JRhRtHhrSo92nW%3DgkQE4Sw7G1RVhnvh-JOjx8%2BX6axA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to