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

json backend datadir can not be set #152

Closed
DrOwl opened this issue Sep 8, 2016 · 4 comments
Closed

json backend datadir can not be set #152

DrOwl opened this issue Sep 8, 2016 · 4 comments

Comments

@DrOwl
Copy link

DrOwl commented Sep 8, 2016

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2016.2
  • Ruby: 2.1.9p490
  • Distribution: Debian
  • Module version: 2.1.3-rc0

How to reproduce (e.g Puppet code you use)

class { 'hiera': backends => [yaml , json], datadir => '/path/to/hieradata' }

What are you seeing

datadir only gets set for :yaml:


:backends:

  • yaml
  • json

:yaml:
:datadir: /path/to/hieradata

What behaviour did you expect instead

datadir is customizable for json

:backends:

  • yaml
  • json

:yaml:
:datadir: /path/to/hieradata

:json:
:datadir: /path/to/hieradata


:backends:

  • yaml
  • json

:yaml:
:datadir: /path/to/hieradata

:json:
:datadir: /path/to/hieradata_json

Output log

Any additional information you'd like to impart

In addition to this :yaml: will allways be set even if its not chosen as a backend

@DrOwl
Copy link
Author

DrOwl commented Sep 8, 2016

I have created https://github.com/DrOwl/puppet-hiera/tree/better_backend_support
but am unsure what tests I should be adding, Can you please offer advice on what tests you would like adding.

@bastelfreak
Copy link
Member

Hi @DrOwl, we just merged #154, could you please test if this works for you?

@logicminds
Copy link
Contributor

@DrOwl see README for examples (backend_options)

@dhoppe
Copy link
Member

dhoppe commented Dec 29, 2016

@DrOwl As @logicminds already mentioned, please use backend_options to provide a specific datadir for yaml and json.

@dhoppe dhoppe closed this as completed Dec 29, 2016
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

4 participants