This repository was archived by the owner on Dec 20, 2024. It is now read-only.
Remove Yaml class serialization information#353
Merged
bastelfreak merged 1 commit intovoxpupuli:masterfrom Nov 15, 2017
Merged
Conversation
`puppet facts --render-as yaml` returns a yaml file which is the serialized version of the object:Puppet::Node::Facts. Mcollective parses this yaml and tries to make a hash out of it. We get an error: `ERROR -- : yaml_facts.rb:31:in `rescue in block in load_facts_from_source' Failed to load yaml facts from /etc/puppetlabs/mcollective/facts.yaml: TypeError: no implicit conversion of Puppet::Node::Facts into HasH` So we are remove that class information out of the yaml to be able to serialize it as a ruby hash.
Member
|
Thanks for this patch @jfroche! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
puppet facts --render-as yamlreturns a yaml file which is theserialized version of the object:Puppet::Node::Facts.
Mcollective parses this yaml and tries to make a hash out of it.
We get an error:
ERROR -- : yaml_facts.rb:31:in `rescue in block in load_facts_from_source' Failed to load yaml facts from /etc/puppetlabs/mcollective/facts.yaml: TypeError: no implicit conversion of Puppet::Node::Facts into HasHSo we are remove that class information out of the yaml to be able to
serialize it as a ruby hash.