Skip to content

Instantly share code, notes, and snippets.

@Freeaqingme
Created April 1, 2013 13:08
Show Gist options
  • Save Freeaqingme/5284846 to your computer and use it in GitHub Desktop.
Save Freeaqingme/5284846 to your computer and use it in GitHub Desktop.
My puppet ENC
#!/usr/bin/env ruby
require 'yaml'
hostname = ARGV[0]
yamlOut = { 'classes' => {}, 'parameters' => {} }
if hostname[-15..-1] == '.dev.enrise.net'
yamlOut['parameters']['zone'] = 'dev'
end
puts yamlOut.to_yaml()
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment