All:

What is the correct way to define a new-style task with parameters that can be 
called via the execute command.

I've tried the following, but I get an error indicating that the hello task 
doesn't take any parameters.

#! /var/lib/python-envs/sysadmin_env/bin/python
from fabric.api import env, execute, task

@task(param1, param2)
def hello():
    print("Hello world! param1 = %s, param2 = %s" % (param1, param2))

if __name__=="__main__":
  execute(hello, param1="param1", param2="param2")


Thanks in advance,

-steve

_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to