Sha256: 728a6bd7a3ff479b19b33e202b9d1a68f8f83e64fe95b89c941182f2e5b9be61

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

#
# Set up our puppet environment
# 

unless attrib?("puppet_env")
  hostname = attrib?("hostname")
  fqdn = attrib?("fqdn")
  if fqdn =~ /amazonaws.com$/
    replace_attrib("puppet_env", "production")
  else
    if hostname =~ /^.+?\d+(.+)$/
      replace_attrib("puppet_env", $1)
    else
      replace_attrib("puppet_env", "production")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
loe-icagent-1.0.0 recipes/02_puppet_env.rb
loe-icagent-1.0.2 recipes/02_puppet_env.rb