Add conditional tasks to template