-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error if datadir is not set in hiera.yaml #108
Comments
Do you still have the exact error message including the stack trace? And the Because this is actually the only place we use code from hiera itself - to get the defaults: hdm/app/models/hiera_data/config.rb Line 15 in f54beeb
And this does in fact include the default for
So in theory this should work. Also in the test data, there is a So I suspect there is some other factor at play here. Could it be that your |
Cross check how hiera.yaml file looks at the customer. |
when datadir is missing in the hiera.yaml the following is in the hdm log
hiera.yaml for this scenario: ---
version: 5
defaults:
lookup_key: eyaml_lookup_key
options:
pkcs7_private_key: "/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem"
pkcs7_public_key: "/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem"
plan_hierarchy:
- name: "Static data"
path: "static.yaml"
hierarchy:
- name: "yaml hierarchy"
paths:
- "nodes/%{facts.networking.hostname}.yaml"
- "role/%{facts.external_facts.role}-%{facts.external_facts.env}.yaml"
- "role/%{facts.external_facts.role}.yaml"
- "role/%{trusted.extensions.pp_role}.yaml"
- "os/%{facts.os.family}.yaml"
- "zone/%{facts.external_facts.zone}.yaml"
- name: "Defaults"
glob: "defaults/*.yaml"
- name: "Common"
path: "common.yaml" |
Before this, hiera defaults were only used when defaults were missing altogether from `hiera.yaml`. This changes that behavior by doing a proper deep merge.
Thank you so much for that backtrace and especially the example configuration. I could now easily reproduce this and the fix was super simple. See #141 |
is datadir is not set in hiera.yaml, one gets an error in the intrface about datadir being empty/nil.
datadir is not mandatory in hiera.yaml, if not set, it is assumed to be "data".
The text was updated successfully, but these errors were encountered: