Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View recipe1.rb
1 2 3 4 5 6 7
secret_path = Pathname(node["my-recipe"]["secret"]["path"])
if secret_path.exist?
secret = secret_path.read
else
secret = new_secret
secret_path.open{|f| f.write(secret)}
end
View recipe1.rb
1 2 3 4 5 6 7 8 9 10 11
secret_path = Pathname(node["my-recipe"]["secret"]["path"])
if secret_path.exist?
secret = secret_path.read
else
# should never get here
raise StandardError, "secret path is missing"
end
 
template "/etc/my-app.conf" do
variables :secret => secret
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.