Hello @all
today i took another try on the role dependency feature and realize that this doesn’t work as i expect this.
First at all:
ansible --version ansible 1.9.2 configured module search path = /usr/share/ansible
I try to explain what i mean with an sample playbook/roles:
`
$ cat play-test.yml
I extend the example with another pice named tags:
`
$ cat play-test.yml
I have opened an Issue on github and jimi-c explained it logical:
Hi @MorphBonehunter, the problem is because allow_duplicates
needs to be set on the base role, not in each of the intermediate roles. Move it there and this should work for you.
I’ve move the “allow_duplicates: yes” to the base role and delete the entry in all other roles and it works like expected…so that was clearly my fault.
`
$ 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]
`
But something is still strange when i remove the “allow_duplicates: yes” also in the base role i got the following:
`
$ 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]
$ 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 case the base role isn’t executed and this i think is not as expected.