- debug: msg="running on {{ inventory_hostname }}"
when: inventory_hostname in groups["backend-servers"]
$ ansible-playbook my_test_playbook.yml -i backend-serversrunning on balance1running on balance2running on balance3$
$ ansible-playbook my_test_playbook.yml -i web-servers$
--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGUDtnkya%3DwVKxwWxs9uxzxw9ti2LPvvaq2mDrz9mFnkY65SYw%40mail.gmail.com.