Re: [ansible-project] Connection: local and Delegate_to - Not working together

25 views
Skip to first unread message

Brian Coca

unread,
Sep 30, 2022, 3:49:08 PM9/30/22
to ansible...@googlegroups.com
A few things,

The connection: keyword just changes the connection, while delegation
changes the target host.

When using connection: local you end up executing on the controller
(your connection is a local fork instead), not delegating to
localhost, there is another step on that. Use delegate_to: localhost
is what you normally want to do.

if you delegate_to: vm_name but set connection to local, you are not
really connecting to vm_name (unless you are overriding the connection
in other ways, like via connection variable). So they work together
and did what you asked them to, it is just that what you asked them to
do makes little sense.

--
----------
Brian Coca

Vichu

unread,
Sep 30, 2022, 4:51:56 PM9/30/22
to Ansible Project

Hi Brain,

Can you elloborate the 3rd paragraph, so i can understand. Thanks in advance.

Vichu

unread,
Sep 30, 2022, 5:00:53 PM9/30/22
to Ansible Project
https://github.com/ansible/ansible/issues/71371

Here is also a similiar problem but could not find a solution out of it

Reply all
Reply to author
Forward
0 new messages