# Ansible design patterns

**URL:** <https://forum.ansible.com/t/ansible-design-patterns/19676>\
**Category:** Ansible Project\
**Created:** [November 3, 2015, 12:10am UTC](https://forum.ansible.com/t/ansible-design-patterns/19676 "2015-11-03T00:10:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_A](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@Praveen\_A](https://forum.ansible.com/u/Praveen_A)\
**Post date:** [November 3, 2015, 12:10am UTC](https://forum.ansible.com/t/ansible-design-patterns/19676/1 "2015-11-03T00:10:38Z")

</div>

Hello chaps,

Is there any design pattern present in ansible to have a proper structure and flow like hiera in puppet.

Thanks,  
Praveen

---

<div class="post-metadata">

**Author:** ![Jeff1](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jeff1](https://forum.ansible.com/u/Jeff1)\
**Post date:** [November 11, 2015, 12:04pm UTC](https://forum.ansible.com/t/ansible-design-patterns/19676/2 "2015-11-11T12:04:56Z")

</div>

I’m an Ansible newbie (and investigating moving away from Puppet) - so I cant give great Ansible advice.  
I think Hiera is well designed - and so far the Ansible model looks simpler to me (that’s a good thing!)

I can point you to articles I found helpful:

[http://rosstuck.com/multistage-environments-with-ansible/](http://rosstuck.com/multistage-environments-with-ansible/)

[http://docs.ansible.com/ansible/playbooks\_best\_practices.html#directory-layout](http://docs.ansible.com/ansible/playbooks_best_practices.html#directory-layout)  
[http://future500.nl/articles/2014/05/how-to-use-ansible-for-vagrant-and-production/](http://future500.nl/articles/2014/05/how-to-use-ansible-for-vagrant-and-production/)

These discuss the hierarchy (ala Hiera), of variable and task determination and give advice on how to organise the manifests.

They were enough to get going for me, in test migrating our 60 odd server setup into Ansible.

Have to say that I prefer the simpler Ansible structure which seems focused on environment/role/purpose over the class directory structure mandated by Puppet.

Just my 2^1 cents.
