# task order execution

**URL:** <https://forum.ansible.com/t/task-order-execution/24166>\
**Category:** Ansible Project\
**Tags:** rhel, ubuntu\
**Created:** [April 6, 2017, 9:57pm UTC](https://forum.ansible.com/t/task-order-execution/24166 "2017-04-06T21:57:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hudec\_Peter](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@Hudec\_Peter](https://forum.ansible.com/u/Hudec_Peter)\
**Post date:** [April 6, 2017, 9:57pm UTC](https://forum.ansible.com/t/task-order-execution/24166/1 "2017-04-06T21:57:26Z")

</div>

Hi,

I'm facin g following ISSUE.

My roles are mostly multi distribution enabled. My testing env is based  
on 8 different distribution/releases  
&nbsp;&nbsp;- debian 7/8, ubuntu 14.04/16.04, centos 6/7, rhel 6/7

My way how to do distribution specific task is as follow

air-2:zabbix-agent hudecof$ cat tasks/main.yml

---

<div class="post-metadata">

**Author:** ![Hudec\_Peter](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@Hudec\_Peter](https://forum.ansible.com/u/Hudec_Peter)\
**Post date:** [April 10, 2017, 6:50pm UTC](https://forum.ansible.com/t/task-order-execution/24166/2 "2017-04-10T18:50:26Z")

</div>

I created test role to demostrate the problem, could be on github  
[https://github.com/hudecof/sensible\_test](https://github.com/hudecof/sensible_test)

The output log on 8 different OS  
- debian:7,8  
- centos: 6,7  
- ubuntu: 14.04, 16.04  
- rhel: 6,7

is in logs directory  
[https://github.com/hudecof/sensible\_test/blob/master/logs/full\_run.log](https://github.com/hudecof/sensible_test/blob/master/logs/full_run.log)

As you can see, the task 01 for debian/ubuntu is run first, then is run  
task 02, which is common for all servers and after that is run task 01  
from centos/rhel.

On vars/os-XXXX.yml is the task order defined and I need to run the task  
in that order, They are defendant ;(  
Any advise?

&nbsp;&nbsp;Peter
