I\'m quite new to Ansible and have a simple question for my understanding of local_action
directive.
Would that mean that the command is fully executed loca
Yes, local_action
is an alternative way of doing delegate_to: localhost
.
These actions will be executed on local machine (Ansible control host), but still being in context of remote host in terms of variables. So you can something like this:
local_action: command ping -c 1 {{ inventory_hostname }}
which will ping every host in your play, but ping will be initiated from Ansible control host.