roleとnodeを設定しておけばいい感じにrake taskを生成します
下記のようなディレクトリ構成を想定しています
roles/<role名>.rb
nodes/<node名>.yml
spec/<role名>/*_spec.rb
Rakefilehosts.yml
rake recipe:production # Run itamae recipes to [production] all
rake recipe:production:myapp-01 # Run itamae recipes to [production] myapp-01 (xxx.xxx.xxx.xxx)
rake recipe:production:myapp-02 # Run itamae recipes to [production] myapp-02 (xxx.xxx.xxx.xxx)
rake recipe:staging # Run itamae recipes to [staging] all
rake recipe:staging:myapp-staging-01 # Run itamae recipes to [staging] myapp-staging-01 (xxx.xxx.xxx.xxx)
rake spec:production # Run serverspec tests to [production] all
rake spec:production:myapp-01 # Run serverspec tests to [production] myapp-01 (xxx.xxx.xxx.xxx)
rake spec:production:myapp-02 # Run serverspec tests to [production] myapp-02 (xxx.xxx.xxx.xxx)
rake spec:staging # Run serverspec tests to [staging] all
rake spec:staging:myapp-staging-01 # Run serverspec tests to [staging] myapp-staging-03 (xxx.xxx.xxx.xxx)