I extend the example with another pice named tags:
$ cat play-test.yml
---
- name: dependency test
gather_facts: false
hosts: localhost
roles:
- { role: feature1, tags: feature1 }
- { role: feature2, tags: feature2 }
This gives me another strage behavior if you look at the following output
(i used --list-tags for simplicity):
$ ansible-playbook play-test.yml --list-tasks
playbook: play-test.yml
play #1 (dependency test): TAGS: []
in base TAGS: [feature1]
in feature1 TAGS: [feature1]
in feature2 TAGS: [feature2]
As there is still allow_duplicates: yes active, i would expect the
execution of base 2 times.
So i try the following (as this is my initial intention to use role
dependencys and tags):
$ ansible-playbook play-test.yml --list-tasks -t feature1
playbook: play-test.yml
play #1 (dependency test): TAGS: []
in base TAGS: [feature1]
in feature1 TAGS: [feature1]
Looks OK to me, but then:
$ ansible-playbook play-test.yml --list-tasks -t feature2
playbook: play-test.yml
play #1 (dependency test): TAGS: []
in feature2 TAGS: [feature2]
So in the second try the base role isn't run at all.
This is definitely not the expected behavior. In the role "feature2" the
dependency is set to the "basic" role and in my eyes if i specify an role
with an tag the dependency should run (like the first one).
Did i miss something?
--
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/a30da201-3bd0-4ade-9e56-46df383169e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.