Skip to content

Instantly share code, notes, and snippets.

@rnhurt
Last active August 29, 2015 14:04
Show Gist options
  • Save rnhurt/4cf1fbb2b7388685fc16 to your computer and use it in GitHub Desktop.
Save rnhurt/4cf1fbb2b7388685fc16 to your computer and use it in GitHub Desktop.
(Ab)using Chef in AWS OpsWorks.
# this will include the standard OpsWorks 'deploy' recipe
include_recipe 'deploy'
# now you can do things like this
node[:deploy].each do |application, deploy|
deploy = node[:deploy][application]
package "GraphicsMagick" do
action :install
options "-y"
end
opsworks_deploy_dir do
user deploy[:user]
group deploy[:group]
path deploy[:deploy_to]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment