Using the @task and submodule convention, my “parent” fabfile imports two submodules (“dev” and “stable” whose tasks are defined in their respective init.py files). How to I get a @task in the dev module to invoke a task defined in the parent fabfile. I can’t seem to get the imports to work correctly.
I also tried using the imp.load_source but that produced a nasty circular import (fabfile.py imports dev which tries to import ../fabfile.py).
Using this as an example: http://docs.fabfile.org/en/1.4.3/usage/tasks.html#going-deeper
How would a task defined in lb.py call something in the top init.py or a task in migrations.py call something in the top init.py?
You can invoke fabric task by name: