Hi Kai, I have been trying various ways to get my playbook working by using hostvars.
Here are some of the ways I have tied, with no luck *Trial1* : when: {{ hostvars['hostname1]['ansible_facts']['distribution']}} == "CentOS" *Trial2*: when: ansible_facts['hostname1']['distribution'] == "CentOS" Can you help me with this? Thanks Srini. On Sat, Sep 21, 2019 at 3:39 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 20.09.2019 09:37, Srinivas Naram wrote: > > Is there a provision to pass 'result' variable to second host ? > > > > No. But you can use hostvars to lookup variable for other hosts. > > -- > Kai Stian Olstad > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/37d13e89-37c6-ac12-4a53-81dfb7e997ac%40olstad.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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG-N3P4WFA1%3DyxHFAk_ZRvbg%2BSCs-tcF14mH8O_gwp%2BHGYAj1Q%40mail.gmail.com.