Skip to content

Instantly share code, notes, and snippets.

@wok
Last active March 24, 2016 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wok/86934c859bcb07333ec9 to your computer and use it in GitHub Desktop.
Save wok/86934c859bcb07333ec9 to your computer and use it in GitHub Desktop.
# Usage
# copy this file to a new director e.g. /root/chef
# run a single recipe as follows:
# ./local_chef.sh -o recipe[myclub::backup]
# put the cookbook path in solo.rb file.
echo 'cookbook_path ["/opt/aws/opsworks/current/merged-cookbooks"]' > solo.rb
# create json file incase if you want use the attributes from opsworks.
opsworks-agent-cli get_json > attributes.json
#run chef-solo
/opt/aws/opsworks/current/bin/chef-solo -c solo.rb -j attributes.json $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment