bazfire
2015-10-15 16:42:53 UTC
I am new to using fabric and have a question about getting fabric to use a particular fabfile.py. I am aware that fabric will look for a fabfile.py in the directory in which the command is issued. fabric will also accept a fabfile.py in the command line using the “-f” option such as
$ fab -f ~/fabfile.py -l
You can also put a definition inside the .fabricrc file such as
fabfile=~/fabfile_1.py
and run your fab command as follows
fab -l
and it will use the fabfile found at ~/fabfile_1.py.
My actual question is that it seems like that the command line option specification for the location of the fabfile should override the .fabricrc specification but it does not seem to. I would have expected the following command to work with the fabfile_2.py even though fabfile_1.py has been specified in the .fabricrc file.
$ fab -f ~/project/fabfile_2.py -l
but this command actually uses ~/fabfile_1.py
Any thoughts or comments?
$ fab -f ~/fabfile.py -l
You can also put a definition inside the .fabricrc file such as
fabfile=~/fabfile_1.py
and run your fab command as follows
fab -l
and it will use the fabfile found at ~/fabfile_1.py.
My actual question is that it seems like that the command line option specification for the location of the fabfile should override the .fabricrc specification but it does not seem to. I would have expected the following command to work with the fabfile_2.py even though fabfile_1.py has been specified in the .fabricrc file.
$ fab -f ~/project/fabfile_2.py -l
but this command actually uses ~/fabfile_1.py
Any thoughts or comments?