I have the following includes in a old role by a colleague.
---
- name: deploy
include: deploy.yml
when: deploy is defined and deploy == 'True'
- name: undeploy
include: undeploy.yml
when: undeploy is defined and undeploy == 'True'
- name: database-migrate
include: database-migrate.yml
when: db is defined and db == 'True'
However, irrespective of how I include the role Ansible is automatically processing each include. I can verify this by using the --list-tasks option.
For example in my playbook I have the following
roles:
- { role: vip-notification-services-app, deploy: 'True', tags: ['deploy']}
I running with version 2.1.1.0 (upgraded a few weeks back). This role was executing fine before the upgrade.
Therefore I'm wondering if this style of includes in a role no longer allowed or there is some different syntax I need to use.