caffeinehit/fabric-provision — pull request #5 by wamcvey (2012-08-09 22:54:35+00:00)
Title: added support for provisioning based on roles (and other refactorings)

I added this a few months ago and have been running it without any problems. Only now pushing the change to github though. Basically, adds a new method `add_role(role_name)` which behaves similarly to `add_recipe()`. The run_list is extended to include both any added roles as well as recipes.

I also did a minor refactor of the data cleanup (cookbook and roles) and distribution, but not yet the rdist refactor. Note that right now, the cookbook directory is pushed over with a recursive put() as opposed to tar create/put()/tar extract. That was more for code clarity before the `fabric.contrib.project.rsync_project` refactor which will get pushed in a subsequent pull request. The recursive `put` is slower than tar/put/tar though.

Finally, made a small tweak to `abort()` with an error if `runchef` is called without the host first being provisioned.