# Dynamic playbook

**URL:** <https://forum.ansible.com/t/dynamic-playbook/25810>\
**Category:** Ansible Project\
**Created:** [October 24, 2017, 3:17pm UTC](https://forum.ansible.com/t/dynamic-playbook/25810 "2017-10-24T15:17:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KP1](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@KP1](https://forum.ansible.com/u/KP1)\
**Post date:** [October 24, 2017, 3:17pm UTC](https://forum.ansible.com/t/dynamic-playbook/25810/1 "2017-10-24T15:17:28Z")

</div>

Hi,  
Is it possible to create dynamic playbook in ansible based on inventory?

My requirement is:

- maintain different inventory files for different applications, which contains sequence/flow of tasks that need to execute
- Using generic playbook(s) i should be able to create playbook for a particular application

For example:  
 → App-1’s playbook might execute tasks in below sequence:  
Task-1  
Task-2  
Task-3

…  
…  
Task-n

→ App-2’s playbook might execute the same tasks in different sequence:  
Task-3  
Task-1  
Task-n  
…  
…  
Task-2

I dont want to maintain separate playbook for each application.

Let me know if you need any other info regarding this.

Thanks
