The version is ansible 1.7.2 (1.7.2+dfsg-2~bpo70+1 - installed from distri repo debian wheezy)
Yes, i narrowed the scope of my tag because i want to run only an subset of tasks of the role. But as this are tasks in the monitoring role, i was expecting the dependency is triggered an the monitoring-basic role is run anyway. I can tag the dependenies also with an whole bunch of tags, but in that case i have to think about it an on every addition in the monitoring role with an other tag i also have to adjust the dependency tags. Am Freitag, 24. Oktober 2014 15:12:17 UTC+2 schrieb Michael DeHaan: > > I'm not sure that's intuitive. > > By tagging all things with "monitoring", everything should get a > "monitoring". > > additionally, the included tasks add a "monitoring:crc" > > I would expect tags should be additive, and "narrowing the scope of your > tags" is not a thing that should be a language concept IMHO. > > > > > On Fri, Oct 24, 2014 at 8:40 AM, James Cammarata <[email protected] > <javascript:>> wrote: > >> 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" <[email protected] >> <javascript:>> wrote: >> >>> For starters, ansible --version output? >>> >>> >>> On Fri, Oct 24, 2014 at 5:29 AM, Daniel Wendler <[email protected] >>> <javascript:>> 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 [email protected] <javascript:>. >>>> To post to this group, send email to [email protected] >>>> <javascript:>. >>>> 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 [email protected] <javascript:>. >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/CAMFyvFi9HAJ%2B0%2BV5RuTJYxRqpRtLxyisQeBUW_JCc%3DC1kc4otQ%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/ansible-project/CAMFyvFi9HAJ%2B0%2BV5RuTJYxRqpRtLxyisQeBUW_JCc%3DC1kc4otQ%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 [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/deb92d92-9b90-41a7-94e8-dfe777a1a18d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
