local host is the ansible master where the role2 has to be executed.
because the role2 is to run some api commands and get server details
role1` is to install components on the server which I get from role2

On Fri, May 26, 2023 at 10:34 AM Dick Visser <[email protected]> wrote:

> I haven't tried this myself (as it sounds too complicated and error
> prone), but I'm guessing because you first run on the remote Windows  host,
> and from there during the other role, localhost is in fact that remote host.
> It makes sense, in a way.
>
> I may be completely wrong though
>
> On Fri, 26 May 2023 at 19:24, Narmada Karthika <[email protected]>
> wrote:
>
>> I am trying a playbook for a role and calling another role with in it.
>> role1 where i am running playbook need to be executed on windows hosts,
>> role 2 which is being called in role1 needs to be executed on
>> localhost(linux).
>> this is from the tasks/main.yml file for role1.
>> but still it is picking windows node from role1 and failing..
>> - name: calling serverdata role here
>>   include_role:
>>     name: serverdata (role2)
>>     tasks_from: main.yml
>>     apply:
>>       delegate_to: localhost
>>
>> --
>> 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/18f6e3a2-5f79-43a2-9d44-2b09e18fa73en%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/18f6e3a2-5f79-43a2-9d44-2b09e18fa73en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> Sent from Gmail Mobile
>
> --
> 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/CAF8BbLaKuC8mNa159X8ePAuVop7jCpCkYs7--hqteHRLqmy2Kw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAF8BbLaKuC8mNa159X8ePAuVop7jCpCkYs7--hqteHRLqmy2Kw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
 Thanks,
Narmada Karthika Chitturi

-- 
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/CABdF8S3XifeJ75kO_Xc%3DXNzA9wqQHJBgXHwXR1LpStrtNN9M-Q%40mail.gmail.com.

Reply via email to