--- - include_tasks: db_node.yml when: inventory_hostname in groups['db'] - include_tasks: app_node.yml when: inventory_hostname in groups['app']