Skip to content

Instantly share code, notes, and snippets.

@lak
Created April 13, 2011 03:12
Show Gist options
  • Save lak/916894 to your computer and use it in GitHub Desktop.
Save lak/916894 to your computer and use it in GitHub Desktop.
json support within Puppet.
luke@syringe $ ruby -rpuppet -rpuppet/network/format_handler -e 'f = Puppet::Network::FormatHandler.format(:pson); k = Puppet::Indirector::Indirection; k.instances.collect { |n| k.instance(n).model }.each { |k| puts "%-40s: #{f.supported?(k)}" % k }'
Puppet::Node::Facts : true
Puppet::Node::Inventory : false
Puppet::Node : false
Puppet::Transaction::Report : false
Puppet::Resource : true
Puppet::Resource::Type : true
Puppet::Resource::Catalog : true
Puppet::SSL::Key : false
Puppet::SSL::Certificate : false
Puppet::SSL::CertificateRequest : false
Puppet::SSL::CertificateRevocationList : false
Puppet::SSL::Host : true
Puppet::Status : true
Puppet::FileBucket::File : true
@lak
Copy link
Author

lak commented Apr 13, 2011

After a bit of work:

luke@syringe $ ruby -rpuppet -rpuppet/network/format_handler -e 'f = Puppet::Network::FormatHandler.format(:pson); k = Puppet::Indirector::Indirection; k.instances.collect { |n| k.instance(n).model }.each { |k| puts "%-40s: #{f.supported?(k)}" % k }'
Puppet::Node::Facts : true
Puppet::Node::Inventory : false
Puppet::Node : true
Puppet::Transaction::Report : false
Puppet::Resource : true
Puppet::Resource::Type : true
Puppet::Resource::Catalog : true
Puppet::SSL::Key : false
Puppet::SSL::Certificate : false
Puppet::SSL::CertificateRequest : false
Puppet::SSL::CertificateRevocationList : false
Puppet::SSL::Host : true
Puppet::Status : true
Puppet::FileBucket::File : true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment