fabric/fabric — Issue #464: Role is undefined, but task gets executed anyway
Author: aknapp
Created: 2011-10-28 18:40:40+00:00
State: open

We have a fabfile here where we pull in the roles from a json file.

In our staging environment, we don't want all the tasks to be run, so we leave some roles undefined. Unfortunately, even if the role is undefined, it's still executing the task on the box, and failing.

Something like this:

@task
@roles('celerymaster')
def kick_celerycam():
kick_daemon('celerycam')

When celeymaster is undefined, it's still executing the task.