Alexander Kolev
2013-09-13 11:23:27 UTC
Hi,
I'm using Fabric 1.7, Python 2.7. This is part of my fabfile.py file
env.roledefs = {
"dev" : ["dev01 "],
"staging" : ["sta01 ", "sta02"],
"live" : ["live01", "live02"]
@roles("staging")
def stage(application=""):
execute(create_package)
execute(copy_package)
execute(run_package)
execute(email_result)
When I call fab stage:appname, it runs the four functions first on sta01 and
then on sta02.
Sta01: create_package
Sta01: copy_package
Sta01: run_package
Sta01: email_result
Sta02: create_package
Sta02: copy_package
Sta02: run_package
Sta02: email_result
Expected result is executing each function on sta01 and sta02, and then
continue with next function:
Sta01: create_package
Sta02: create_package
Sta01: copy_package
Sta02: copy_package
Sta01: run_package
Sta02: run_package
Sta01: email_result
Sta02: email_result
What is wrong with my script?
Regards,
Alex
I'm using Fabric 1.7, Python 2.7. This is part of my fabfile.py file
env.roledefs = {
"dev" : ["dev01 "],
"staging" : ["sta01 ", "sta02"],
"live" : ["live01", "live02"]
@roles("staging")
def stage(application=""):
execute(create_package)
execute(copy_package)
execute(run_package)
execute(email_result)
When I call fab stage:appname, it runs the four functions first on sta01 and
then on sta02.
Sta01: create_package
Sta01: copy_package
Sta01: run_package
Sta01: email_result
Sta02: create_package
Sta02: copy_package
Sta02: run_package
Sta02: email_result
Expected result is executing each function on sta01 and sta02, and then
continue with next function:
Sta01: create_package
Sta02: create_package
Sta01: copy_package
Sta02: copy_package
Sta01: run_package
Sta02: run_package
Sta01: email_result
Sta02: email_result
What is wrong with my script?
Regards,
Alex