Skip to content
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

check_hiera_keys errors on hiera.yaml #81

Open
ghoneycutt opened this issue May 11, 2017 · 1 comment
Open

check_hiera_keys errors on hiera.yaml #81

ghoneycutt opened this issue May 11, 2017 · 1 comment

Comments

@ghoneycutt
Copy link
Member

puppet-syntax 2.4.0 is configured to check Hiera keys

PuppetSyntax.check_hiera_keys = true

This produces an error related to symbols being found in Hiera's configuration.

$ bundle exec rake check
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
rake aborted!
WARNING: hieradata/hiera.yaml: Key :hierarchy: Puppet automatic lookup will not look up symbols
WARNING: hieradata/hiera.yaml: Key :eyaml: Puppet automatic lookup will not look up symbols
WARNING: hieradata/hiera.yaml: Key :backends: Puppet automatic lookup will not look up symbols
/home/travis/.rvm/gems/ruby-1.8.7-p371/gems/puppet-syntax-2.4.0/lib/puppet-syntax/tasks/puppet-syntax.rb:91:in `initialize'
/home/travis/build/nytm/puppetdata/Rakefile:31
/home/travis/.rvm/gems/ruby-1.8.7-p371/bin/ruby_executable_hooks:15
Tasks: TOP => syntax => syntax:hiera => syntax:hiera:yaml

Not expected since Hiera's configuration uses symbols
https://docs.puppet.com/hiera/3.3/configuring.html#example-config-file

What's strange is this happens with Puppet 3.8.7 with ruby 1.8.7 in Travis and not with Puppet v4 and ruby 2.1.

@domcleal
Copy link
Contributor

This looks expected as the hiera.yaml has a YAML extension and is inside the data directory. Naming the file hiera.conf would perhaps prevent it? Otherwise I think you need to add a feature to exclude certain filenames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants