I'd like to use tags to select specific set of tasks in the case of an installation or another in the an upgrade: so the scenario let's say: I have a task A and a task B I'd like to use tags to select either A or B here is what I have so far : a role where in my task/main.yml :
- name: "Configuration"
include: 03-configuration.yml
when: upgrade
tags:
- configuration
so I launch my playbook like this which leads me to go to the file 03-configuration.yml and plays everything in this file
ansible-playbook -v ThePlayBook.yml --tags "configuration"
the 03-configuration.yml file:
- name: "A"
- name: "B"
but as you can see in this file 03-configuration.yml I have the two task I'm talking about A and B so at this moment it will try to execute both of them, whereas I want to make use of a tag like "installation" or "upgrade" to launch either one of them.