Skip to content

Instantly share code, notes, and snippets.

@ohadlevy
Created November 5, 2009 10:33
Show Gist options
  • Save ohadlevy/226973 to your computer and use it in GitHub Desktop.
Save ohadlevy/226973 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require "puppet"
Puppet[:config] = "/etc/puppet/puppet.conf"
Puppet.parse_config
conf = Puppet.settings.instance_variable_get(:@values)
conf[:main][:environments].split(",").each do |e|
puts "#{[e.to_sym]}: #{conf[e.to_sym][:modulepath]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment