As discussed in Using an SSH keyfile with Fabric, it is possible to set an ssh keyfile using env.key_filename
. How does this setting interact with defining remote hosts in env.roledefs
?
If I set key_filename, will Fabric try to use that key with all hosts? What if different hosts require different keys?
A workaround would be to set env.hosts
and env.key_filename
in a separate task for each set of hosts, but is there a way that makes use of the roledefs feature?