The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #13949

Documentation unclear re facts.yaml

Added by Ben Ford about 2 years ago. Updated 4 months ago.

Status:RejectedStart date:04/13/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Keywords: Affected URL:http://docs.puppetlabs.com/guides/inventory_service.html
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Docs say:

To insert facts for a fictional node into the inventory:

* curl -k -X PUT -H 'Content-Type: text/yaml' --data-binary @/var/lib/puppet/yaml/facts/hostname.yaml https://puppet:8140/production/facts/{node certname}

On PE, the directory puppet agent --configprint yamldir/facts does not exist, so I tried to generate this file with facter -y. As the yaml generated by facter is not what’s expected by the api, the call fails.

With Hunner’s help, I generated a facts.yaml with /opt/puppet/bin/ruby -e ‘require “puppet”;File.open(“/tmp/facts.yaml”,“w+”){|f|f.write Puppet::Node::Facts.new(“junkyard.puppetlabs.lan”,Facter.to_hash).to_yaml}’ and the api call succeeded.

I don’t know if the problem is that the fact yaml files aren’t being saved (locate $hostname.yaml didn’t find it) or that the documentation isn’t clear as to where this should come from or how you build it, but it was a significant problem for me.

History

#1 Updated by Nick Fagerlund 4 months ago

  • Status changed from Unreviewed to Rejected

Since then, puppetdb took over our world. I don’t expect this is blocking anyone from getting things done anymore.

Also available in: Atom PDF