Hi Vladimir,

I'm not sure what you are getting at... The above example seems to work for
me without setting delegate_facts to True. We are not changing any facts or
variables related to the rhel8 host in this example, the variable matters
in the context of the task.

-- Juerg

On Fri, Feb 26, 2021 at 10:28 PM Vladimir Botka <[email protected]> wrote:

> Hi!
>
> On Fri, 26 Feb 2021 22:13:19 +0100
> Juerg Ritter <[email protected]> wrote:
>
> > - name: Remote Port Test
> >   hosts: localhost
> >   tasks:
> >   - name: delegate command
> >     command: whoami
> >     delegate_to: rhel8
> >     vars:
> >       ansible_ssh_port: 2222
>
> Intuitively, I'd expect `delegate_facts: True` is needed to change the
> port of rhel8.
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#delegating-facts
>
> --
> Vladimir Botka
>


-- 

Jürg Ritter, RHCE
Consultant

Red Hat Switzerland <https://www.redhat.com/>

Europaallee 41

CH-8021 Zürich

[email protected]
M: +41-(0)79-715-09-90
<https://www.redhat.com/>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFjmT8meNcY%2B2ksrsjJnR4gDidU1YngGk904AnJdZvnfU9K2Kg%40mail.gmail.com.

Reply via email to