Reputation: 65
I am new in fabric. I am trying to pass two command after the function of fabfile.py
I am trying like that
fab fabfile.py taskA /idep/etl/config.xml , lbs
Here taskA
is a function.
But it is not working. It throws error like "No such file or directory: 'taskA'". How can I pass the arguments? Actually I'm trying to forwarding port to remote machine.
Upvotes: 1
Views: 3659
Reputation: 4131
This is documented here. After you setup the task to take arguments, you would then do something akin to this:
fab taskA:'/idep/etl/config.xml,lbs'
note: if you are using a fabfile named fabfile.py
the fab command assumes this, and does not need the extra specification (which you also did w/o using the -f
flag)
also note: you can specify hosts to act on, via the cli, with the -H --hosts
flags
To get a better handle on these sorts of things you really should go through the tutorial.
Upvotes: 3