1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Simplify code a little

This commit is contained in:
Toshio Kuratomi 2015-11-19 09:55:06 -08:00
parent 72558f7ecd
commit d75e707af5

View file

@ -134,10 +134,7 @@ class ActionModule(ActionBase):
try:
dest_host = dest_host_inventory_vars['ansible_host']
except KeyError:
try:
dest_host = dest_host_inventory_vars['ansible_ssh_host']
except KeyError:
dest_host = inventory_hostname
dest_host = dest_host_inventory_vars.get('ansible_ssh_host', inventory_hostname)
dest_is_local = dest_host in C.LOCALHOST