Hi Vladimir, I have tried with your suggestion and got following error.
--------------- fatal: [172.19.251.173]: FAILED! => {"msg": "The conditional check 'hostvars['hostname1']['ansible_facts']['distribution'] == 'CentOS'' failed. The error was: error while evaluating conditional (hostvars['hostname1']['ansible_facts']['distribution'] == 'CentOS'): \"hostvars['hostname1']\" is undefined\n\n ---------- Kindly help. Thanks On Mon, Sep 30, 2019 at 9:48 PM Vladimir Botka <vbo...@gmail.com> wrote: > On Mon, 30 Sep 2019 20:03:25 +0530 > Srinivas Naram <srinivas.nar...@gmail.com> wrote: > > > *Trial1* : > > when: {{hostvars['hostname1]['ansible_facts']['distribution']}} == > "CentOS" > > Try this one > > when: "hostvars['hostname1']['ansible_facts']['distribution'] == > 'CentOS'" > -- 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-N3P6vtS6GBBFczMEKW9SGaopLkYZzeabb9WDaL5neS_H90A%40mail.gmail.com.