Merge Host.ipv[46]_address into .address

The earlier distinction was never used; .ipv6_address was always a copy
of .ipv4_address, and the latter was always used to set the remote_addr
field in the PlayContext.

Also uses the canonical ansible_host/ansible_port names when setting the
address and port from variables.
This commit is contained in:
Abhijit Menon-Sen 2015-09-17 23:00:05 +05:30
parent 3db8070aa3
commit 575a8b8c77
5 changed files with 11 additions and 14 deletions

View file

@ -460,7 +460,7 @@ class TaskExecutor:
# FIXME: calculation of connection params/auth stuff should be done here
if not self._play_context.remote_addr:
self._play_context.remote_addr = self._host.ipv4_address
self._play_context.remote_addr = self._host.address
if self._task.delegate_to is not None:
self._compute_delegate(variables)