mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 08:26:28 +00:00
Simplify code a little
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user