>
> As I composed one role which partially can be reused in some others I
> tried the following syntax in playbook:
>
> hosts: test
> sudo: True
> roles:
> - common
> - { role: big, tags: [ 'aaa', 'bbb' ]}
>
> But looks like tags functionality is not working. If I run playbook with
> --tags arg it runs only matching tags, but when I want to list all tags to
> execute in roles it runs the whole role.
>
>
This doesn't mean "run tasks tagged aaa and bbb in role big", it means "tag
all of role big with tags aaa and bbb". This is so you can have a playbook
that calls certain roles conditionally, based on the tags you're executing.
If you find yourself trying to call parts of a role, I would suggest
breaking that role up into smaller roles and calling those as needed. The
point of a role is to be a single useful set of tasks that is executed as a
group, so if your roles are not decomposed enough, you will probably have
trouble.
Hope this helps!
-Tim
--
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/CAH4wdVVn7kBqL0JdkfkGb5N4z3nqRHaemYx-yP6uwYHadTm72w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.