# Call role multiple times with different tags

**URL:** <https://forum.ansible.com/t/call-role-multiple-times-with-different-tags/17380>\
**Category:** Ansible Project\
**Created:** [January 27, 2015, 2:23am UTC](https://forum.ansible.com/t/call-role-multiple-times-with-different-tags/17380 "2015-01-27T02:23:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Porter](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kevin\_Porter](https://forum.ansible.com/u/Kevin_Porter)\
**Post date:** [January 27, 2015, 2:23am UTC](https://forum.ansible.com/t/call-role-multiple-times-with-different-tags/17380/1 "2015-01-27T02:23:31Z")

</div>

From one ansible script I would like to call a single role multiple times passing different tags in.

example:

`  
roles:

- role: service-name  
tags:

- install

- role: get-configs-from-git

- role: service-name  
tags:

- configure

- start

`

Or is there another common pattern used to handle such case?

---

<div class="post-metadata">

**Author:** ![Giovanni\_Tirloni](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@Giovanni\_Tirloni](https://forum.ansible.com/u/Giovanni_Tirloni)\
**Post date:** [January 28, 2015, 12:56pm UTC](https://forum.ansible.com/t/call-role-multiple-times-with-different-tags/17380/2 "2015-01-28T12:56:30Z")

</div>

> From one ansible script I would like to call a single role multiple times passing different tags in.

[...]

> Or is there another common pattern used to handle such case?

If a server has role 'webserver', I would add tasks inside that role to  
install, configure and start it.

Otherwise you start thinking "this server has role X, but is it  
configured or just installed?".. that's question you might ask for a  
package, not a role. IMHO.

Giovanni
