Ansible doesn't support role dependency using tags. Tags are only used for 
executing specific tasks which can be passes from the command line.

To do what you want, you would have to define a variable in the other_role 
and set a when: clause on all tasks when that variable is true, or set.

On Thursday, July 2, 2015 at 3:46:21 PM UTC+2, Jacob Seeley wrote:
>
> Hello,
>
> I'd like to have one role be dependent upon another role's tag only. Here 
> is what I am trying:
>
> # meta/main.yml
>
> ---
>
> dependencies:
>   - { role: common }
>   - { role: other_role, tags: ['other_role_autofs'] }
>
>
>
> *Expected Behaviour*All tasks in the role *common* are run
> Only the role *other_role*' task with a tag of *other_role_autofs* is run
>
>
> *Actual Behaviour*
> All tasks in the role *common* are run
> All tasks in the role *other_role *are run
>

-- 
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/283e3872-d662-4bb8-9a72-2be96a43cb71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to