I'm trying to use role tags with ansible 1.4.1 but they do not seem to
work. Any clue?
#file ex.yml
---
- hosts: localhost
roles:
- { role: example, tags: ['uno', 'dos'] }
#file roles/example/tasks/main.yml
---
- name: algo1
shell: ls /tmp
tags: uno
- name: algo2
shell: ls /tmp
tags: dos
- name: algo3
shell: ls /tmp
tags: tres
# Then
# ansible-playbook ex.yml --connection=local
# or
# ansible-playbook ex.yml --connection=local --tags=uno,dos
# outputs:
[eroldan@lxvm ansible]$ ansible-playbook ex.yml --connection=local
PLAY [localhost]
**************************************************************
GATHERING FACTS
***************************************************************
ok: [localhost]
TASK: [example | algo1]
*******************************************************
changed: [localhost]
TASK: [example | algo2]
*******************************************************
changed: [localhost]
TASK: [example | algo3]
*******************************************************
changed: [localhost]
PLAY RECAP
********************************************************************
localhost : ok=4 changed=3 unreachable=0 failed=0
What I expected is the tasks "uno" and "dos" and not "tres" to be ran.
--
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].
For more options, visit https://groups.google.com/groups/opt_out.