Simplify code a little

pull/13281/head
Toshio Kuratomi 10 years ago
parent c99fffa936
commit 1e968d34cb

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

Loading…
Cancel
Save