Hi All,
I want to use tags inside the roles, here is my usecase:
I want to execute tasks marked with aaaa from testrole:
[root@wildfly ~/ansible]$ cat test.yml
---
- hosts: local
roles:
- {role: testrole, tags: ['aaaa']}
here is the role:
[root@wildfly ~/ansible]$ cat roles/testrole/tasks/main.yml
---
- name: aaaa tag
local_action: command echo
tags:
- aaaa
- name: bbbb tag
local_action: command echo
tags:
- bbbb
but both tasks are executed:
[root@wildfly ~/ansible]$ ansible-playbook -i inventory.ini test.yml
PLAY [local]
******************************************************************
GATHERING FACTS
***************************************************************
ok: [localhost]
TASK: [testrole | aaaa tag]
***************************************************
changed: [localhost -> 127.0.0.1]
TASK: [testrole | bbbb tag]
***************************************************
changed: [localhost -> 127.0.0.1]
PLAY RECAP
********************************************************************
localhost : ok=3 changed=2 unreachable=0 failed=0
Is this OK, or bug?
Regards,
Vlado
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0a285795-8acd-40a6-bb6b-1f0f4ccdcbb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.