mattray/spiceweasel — pull request #11 by brianbianco (2012-03-14 19:48:32+00:00)
Title: Added support for nesting role files in subdirectories of the role/ directory.

I happen to organize a lot of my role files into sub directories. Spice weasel didn't support this so I quickly threw together some code that will support this. I've only really tested it for my environment but it seems to work just fine.

Running: spiceweasel --dryrun spiceweasel/capacity_xlarge.yml

where capacity_xlarge.yml is

cookbooks:
aws:
lvm:
volumes:

roles:
- ec2_m1_xlarge_rev0:

and ec2_m1_xlarge_rev0.rb is located in roles/vm/

the following is the output

knife cookbook upload aws
knife cookbook upload lvm
knife cookbook upload volumes
knife role from file roles/vm/ec2_m1_xlarge_rev0.rb