Skip to content

@yfeldblum /recipe1.rb secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
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.