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

Remove Yaml class serialization information #353

Merged
merged 1 commit into from Nov 15, 2017

Conversation

jfroche
Copy link
Contributor

@jfroche jfroche commented Nov 14, 2017

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.

`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.
@bastelfreak bastelfreak added the bug Something isn't working label Nov 15, 2017
@bastelfreak
Copy link
Member

Thanks for this patch @jfroche!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants