Skip to content

Instantly share code, notes, and snippets.

@bradphelan
Created February 4, 2010 17:46
Show Gist options
  • Save bradphelan/294916 to your computer and use it in GitHub Desktop.
Save bradphelan/294916 to your computer and use it in GitHub Desktop.
# site-cookbooks/awssecrets/attrbutes/default.rb
# Trying to provide a common recipe and error checking
# to make sure the AWS secrets are there.
if not self.key? :awssecrets or not self[:awssecrets].key? :access_key or not self[:awssecrets].key? :secret_key
raise <<-EOF
Please set the awssecrets[:accesskey] and awssecrets[:secretkey] attributes
EOF
end
{
"json_class": "Chef::Role",
"chef_type": "role",
"description": "PoolParty cloud",
"default_attributes": {
"bootstrap": {
"chef": {
"server_fqdn": "ec2-79-125-22-53.eu-west-1.compute.amazonaws.com"
}
},
"awssecrets": {
"secret_key": "xxxxxxxxxxxx",
"access_key": "xxxxxxxxxxxx"
}
},
"name": "master",
"recipes": [
"rubygems_update",
"awssecrets",
"bootstrap08::server"
],
"override_attributes": {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment