# Pastebin aS5im1Gm domain = 'example.com' tree = { 'puppet.master.ssl.ca/ca_crl.pem' => File.open("%s/ca/ca_crl.pem" % [domain], 'rt') { |f| f.read }.to_s, } print tree.to_yaml