# Executing a role dependency on all hosts in a list before executing main role

**URL:** <https://forum.ansible.com/t/executing-a-role-dependency-on-all-hosts-in-a-list-before-executing-main-role/33053>\
**Category:** Ansible Project\
**Created:** [May 29, 2020, 8:10pm UTC](https://forum.ansible.com/t/executing-a-role-dependency-on-all-hosts-in-a-list-before-executing-main-role/33053 "2020-05-29T20:10:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quaffles](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/quaffles/32/927_2.png) [@quaffles](https://forum.ansible.com/u/quaffles)\
**Post date:** [May 29, 2020, 8:10pm UTC](https://forum.ansible.com/t/executing-a-role-dependency-on-all-hosts-in-a-list-before-executing-main-role/33053/1 "2020-05-29T20:10:15Z")

</div>

I’m relatively new to Ansible and I have a question about role dependencies.

Is it possible to have a dependency execute on all hosts in a hostList before proceeding to perform the tasks of the given role

Just a sudo code example
