Skip to content

Instantly share code, notes, and snippets.

@jpadams
Created December 9, 2016 19:57
Show Gist options
  • Select an option

  • Save jpadams/0c346356d9c573b61bbc379ddfd889cc to your computer and use it in GitHub Desktop.

Select an option

Save jpadams/0c346356d9c573b61bbc379ddfd889cc to your computer and use it in GitHub Desktop.
require 'json'
fact_to_lookup = ARGV.shift
vra_facts = JSON.parse(%x(/opt/puppetlabs/bin/facter puppet_vra_properties -j))
vra_prop = "Puppet.VRA.Prop.#{fact_to_lookup}"
puts vra_facts["puppet_vra_properties"][vra_prop]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment