Skip to content
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
IMIO:fix-yaml-facts-source
Nov 15, 2017
Merged

Remove Yaml class serialization information#353
bastelfreak merged 1 commit intovoxpupuli:masterfrom
IMIO:fix-yaml-facts-source

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants