Hi Brian, I made the changes based on your suggestions and they work fine. Thank You very much for your help.
Regards, Alex On Thu, Jul 6, 2017 at 6:06 AM, Brian Coca <[email protected]> wrote: > using set_fact that way requires you to check if those vars are > defined, i believe this is a better approach: > > vars: > is_master: "{{ inventory_hostname == master_hostname }}" > is_slave: "{{ inventory_hostname == master_hostname }}" > > then you can just use them direcly in subsequent conditionals: > > when: is_master|bool > > > There are other approaches as well, i.e using group_by, but I think > the one above should work best for you. > ---------- > Brian Coca > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/ansible-project/697Ke5ficy0/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ansible-project/CACVha7eMHd%2BWdX4fBtKwfHABZHkF8nf- > sLYhu9GZTz3QEY3M7Q%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJGf5rzQ%3DSo8KbSSzpKZSevxkTbtrBuE6pTdRQasZbhFuBeOiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
