Closed artizirk closed 2 years ago
Great idea! I've added an implementation of this in https://github.com/Fizzadar/pyinfra/pull/734/commits/7bdf55db6e5e94f7b3d87cbf0094ddc5646304f8, pending 1.5.1 or 1.6.
This is now live in v1.6
:)
Just wanted to make it clear that what you do to set this is, for example, in group_data/all.py
, add ssh_config_file = "custom_ssh_config"
. If you wanted to set a custom config per group, then you would put that into an appropriate group_data/some_group.py
.
Writing this because there are no docs apart from this line of code: https://github.com/Fizzadar/pyinfra/blob/7bdf55db6e5e94f7b3d87cbf0094ddc5646304f8/pyinfra/api/connectors/ssh.py#L170
That would allow shipping the
ssh_config
file in the repo next to other inventory and deploy files. I mostly use thessh_config
file for configuring ProxyJump config arguments.OpenSSH client has
-F
option that allows using other config file.Currently i'm hacking around this limitation by injecting this snippet into my
config.py