This is happening because you have narrowed the scope of your tags, and the dependent role is only inheriting the "monitoring" tag from its parent role. If you still need to have your deps run when other tags are specified, you can add them to the list of tags on the dependency:
- dependencies: - { role: monitoring a basics, tags: monitoring:crc } The same will go for your other tags, which you can add to the list. On Oct 24, 2014 7:17 AM, "Michael DeHaan" <mich...@ansible.com> wrote: > For starters, ansible --version output? > > > On Fri, Oct 24, 2014 at 5:29 AM, Daniel Wendler < > daniel.wendler....@gmail.com> wrote: > >> Hello @all, >> >> i have an strage behavior with role dependencies and tags. >> I have an playbook like this: >> >> --- >> - name: install and configure a basic set of tools >> gather_facts: true >> hosts: >> - is >> >> >> roles: >> - { role: monitoring, tags: monitoring } >> - { role: other, tags: other } >> >> In the "monitoring" role i have a dependency: >> --- >> dependencies: >> - { role: monitoring-basics } >> >> >> >> and in the tasks/main.yml i have some includes: >> --- >> - include: bm-crc.yml tags=monitoring:crc >> >> - include: bm-hostnotes.yml tags=monitoring:hostnotes >> >> - include: bm-vital.yml tags=monitoring:vital >> >> So when i run the playbook with "ansible-playbook playbook.yml >> --tags=monitoring" all went fine, the dependency role is executet bevor all >> task in the main.yml. >> But when i try to run a subset of taks with "ansible-playbook >> playbook.yml --tags=monitoring:crc" only the monitoring:crc tasks are >> executed but NOT the dependent role. >> Is this a wanted behavior? >> From my point of view dependencies should executed every time i try to >> run somethin on the monitoring role even when i try to run an subset. >> >> Greeting Daniel >> >> -- >> 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 ansible-project+unsubscr...@googlegroups.com. >> To post to this group, send email to ansible-project@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/2fe87927-b537-4ac7-ad19-d1bb9562ca5a%40googlegroups.com >> <https://groups.google.com/d/msgid/ansible-project/2fe87927-b537-4ac7-ad19-d1bb9562ca5a%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwxsnL1THN-m3PM3vEOM1CH7aATKMogdrvd%2BCzwucroKQ%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwxsnL1THN-m3PM3vEOM1CH7aATKMogdrvd%2BCzwucroKQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAMFyvFi9HAJ%2B0%2BV5RuTJYxRqpRtLxyisQeBUW_JCc%3DC1kc4otQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.