set the host connection via a variable
currently changing from hostname.local
, via jumphost or direct through tor means changing round all the variables in the inventory host_vars file.
It would be better to just set another variable per host to set:
connection_type: direct
connection_type: jump
connection_type: tor
and register the variables in the playbook if possible.
I'm not sure if this is possible because of how they work, so auto updating via a playbook script might work instead.