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
configuring hosts in v2 #1748
Comments
I have the same question. I came up with a solution of putting conn = Connection('myhost')
@task
def my_ls(c):
conn.run('ls')
@task
def my_cd(c):
conn.run('cd')
.... But I don't like the solution and feel that there should be a way to inject a default connection into the context. |
I'd like to know as well. Would be convenient to be able to put hosts in the config file. Also not providing a host list (with -H) defaults to localhost. I'd like to see an option to prevent this/raise error. |
Agreed with all above. I really miss the old env.hosts setting. It was beautifully simple. -1 on needing another config file like invoke.yaml or whatnot. I would much prefer to monkey-patch or some kind of import hook that let me state the hosts. It also took me a while to figure out that |
See #4! |
Hi! Is it possible to specify
hosts
either in a config file or the fabfile itself?I know I can provide them via CLI (
-H
), but if the fabfile is designed to communicate with a specific server, then it just forces the user to do extra stuff for no good reason.The "best" solution I could figure out was to create the connection by hand, e.g.
but that seems quite dirty as I need to (1) duplicate it everywhere and (2) it makes the context argument pointless.
The text was updated successfully, but these errors were encountered: