diff --git a/connection/ssh.py b/connection/ssh.py index 2f7be49..86f4c58 100644 --- a/connection/ssh.py +++ b/connection/ssh.py @@ -80,7 +80,7 @@ class Connection(SSH.Connection): def set_host_overrides(self, host, hostvars=None, templar=None): if self._container_check() or self._chroot_check(): - physical_host_addrs = hostvars.get('physical_host_addrs', {}) + physical_host_addrs = host.get_vars().get('physical_host_addrs', {}) physical_host_addr = physical_host_addrs.get(self.physical_host, self.physical_host) self.host = self._play_context.remote_addr = physical_host_addr