Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fabric2 - fabfile.py in root folder is not found #2272

Open
mcgaw opened this issue Jun 9, 2023 · 2 comments
Open

fabric2 - fabfile.py in root folder is not found #2272

mcgaw opened this issue Jun 9, 2023 · 2 comments

Comments

@mcgaw
Copy link

mcgaw commented Jun 9, 2023

fab should seach ancestor folders for a fabfile.py. However it skips the root folder. (This is documented here)

Admittedly this might be an unusual place to put the fabfile.py, but technically it should work imo.

Fabric 3.1.0
Paramiko 3.2.0
Invoke 2.1.2

Python 3.10.12 on Linux.

I stumbled on this when looking to have the fabfile found automatically in a Gitlab Docker build (which by default creates a folder at /builds, so the fab file needed to be above this).

Work around is to use the -r flag.

@LuckyType
Copy link

LuckyType commented Jun 9, 2023

You could create a configuration file fabric.yml in your project directory, home directory or at /etc/fabric.yml with

tasks:
  search_root: /path/to/your/collection/root

This is documented here and here

@mcgaw
Copy link
Author

mcgaw commented Jun 9, 2023

@LuckyType Hi, I already have a workaround as described - thanks.

@mcgaw mcgaw changed the title fabric 3 - fabfile.py in root folder is not found fabric2 - fabfile.py in root folder is not found Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants