I believe that the hosts is loaded before the role (or its vars). Try changing app_install_main.yml to
- name: install app and join systems to domain hosts: testservers become: yes Or, passing -e '{"test":"testservers"}' when you run ansible. -- 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 post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7a0d7cf2-92d1-4fa8-af39-05a371312c61%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.