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

Format options value as json if it is a hash #270

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

ZeroPointEnergy
Copy link
Contributor

Plugins like hiera_vault have option values that are themself hashes. Currently the template will simply write this down as a string value, which leads to a broken configuration.

The implementation in this PR uses the fact that JSON is a valid subset of YAML. This may not look pretty as everything ends up on the same line, but it will always be valid.

I'm also not sure if it would be better to use the same methods if the value is an array, which could hold hashes as values as well and that isn't really handled correctly at the moment.

Let me know what you think.

@bastelfreak
Copy link
Member

thanks for the PR!

@bastelfreak bastelfreak merged commit 6c16b30 into voxpupuli:master Nov 25, 2019
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