[Fab-user] Question on "roles" and depend vs invoke.
From:
Nicolas Steinmetz
Subject:
[Fab-user] Question on "roles" and depend vs invoke.
Date:
Mon, 17 Nov 2008 10:58:40 +0100
Hello,
I just switched to master version to get roles, depends & last commit from Jeff working and I have a question on the sample file :
1/ Question on roles :
@roles('rdbms') def prepare_db():
run("echo Preparing database for deployment")
@roles('httpd') def prepare_web(): run("echo Preparing web servers for deployment")
@depends(prepare_db, prepare_web)
@roles('httpd') def deploy(): run("echo Doing final deployment things to $(fab_host)")
What is the use of @roles("httpd") for deploy whereas roles are already set in the prepare_db and prepare_web level ?
Shouldn't it be :
@depends(prepare_db, prepare_web) def deploy(): run("echo Doing final deployment things to $(fab_host)")
2/ Question on depends vs invoke
Based on same example, should i understand that depends will be run and then act as a replacement of invoke ?
3/ Fabric > 0.0.9 is python 2.5+ only as functools is not available in python 2.4 (which I have to use... so I'm blocked on 0.0.9 release at work... grumbl...)