Skip to content

Support for rewriting hiera datadir from multiple backends#32

Merged
kpaulisse merged 2 commits intogithub:masterfrom
masterzen:feature/support-other-hiera-backends
Dec 14, 2016
Merged

Support for rewriting hiera datadir from multiple backends#32
kpaulisse merged 2 commits intogithub:masterfrom
masterzen:feature/support-other-hiera-backends

Conversation

@masterzen
Copy link
Copy Markdown
Contributor

Overview

This pull request introduces support for multiple hiera backend datadir rewriting.

The current code only allows the fixed hiera backend yaml and json. For people using other backends like for instance hiera_eyaml, the datadir key of the backend section wouldn't be rewritten.

This change will make sure to rewrite all defined backend datadir entries.

Checklist

  • Make sure that all of the tests pass, and fix any that don't. Just run rake in your checkout directory, or review the CI job triggered whenever you push to a pull request.
  • Make sure that there is 100% test coverage by running rake coverage:spec or ignoring untestable sections of code with # :nocov comments. If you need help getting to 100% coverage please ask; however, don't just submit code with no tests.

Brice Figureau and others added 2 commits December 8, 2016 14:28
When using hiera-eyaml with a hiera.yaml like:
~~~yaml
---
:backends:
  - eyaml
  - yaml
:eyaml:
  :datadir: '/etc/puppet/code/environments/production/hieradata'
:yaml:
  :datadir: '/etc/puppet/code/environments/production/hieradata'
...
~~~

Octocatalog-diff was rewriting only the yaml (and/or json) datadir
and not other backends datadir.

This changes rewrites all datadir from all declared backends.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
Copy link
Copy Markdown
Contributor

@kpaulisse kpaulisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you very much for your contribution!

@kpaulisse kpaulisse merged commit 4aceadc into github:master Dec 14, 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

Successfully merging this pull request may close these issues.

2 participants