Implement nested tasks

This commit is contained in:
Thibault Jouan
2014-09-24 22:26:22 +00:00
parent ede9ea7111
commit 638f8320bc
5 changed files with 48 additions and 6 deletions

View File

@@ -18,8 +18,12 @@ module Producer
if task.condition_met?
@env.log "Task: `#{task}' applying..."
task.actions.each do |e|
@env.log " action: #{e}"
e.apply unless @env.dry_run?
case e
when Task then process_task e
else
@env.log " action: #{e}"
e.apply unless @env.dry_run?
end
end
else
@env.log "Task: `#{task}' skipped"