# Newbie: Need best practice advice on ansible used as configuration manager.

**URL:** <https://forum.ansible.com/t/newbie-need-best-practice-advice-on-ansible-used-as-configuration-manager/21111>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [April 8, 2016, 5:22pm UTC](https://forum.ansible.com/t/newbie-need-best-practice-advice-on-ansible-used-as-configuration-manager/21111 "2016-04-08T17:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_P\_V](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@Anthony\_P\_V](https://forum.ansible.com/u/Anthony_P_V)\
**Post date:** [April 8, 2016, 5:22pm UTC](https://forum.ansible.com/t/newbie-need-best-practice-advice-on-ansible-used-as-configuration-manager/21111/1 "2016-04-08T17:22:26Z")

</div>

I build simple servers for customers. Like, email, ftp, webserver and samba.

Just started using ansible and it is great for setup and reuse of work. I am using roles from ansible galaxy.

Each server is independent. That means I do not have a cluster of servers to manage. The most I can think of now that will be like a cluster is to do a yum update for all the servers. Having said that, most of the time each server is independent.

I can get the server installed with the necessary packages using roles. So my playbook file looks something like this.

roles:

- network
- epel\_repo
- common
- samba

task:

- name: Create groups  
task:
- name: Create users  
task:
- name: Upload smb.conf  
task:

What is the best practice method to manage the configuration? What is a good folder structure?

Currently I have, after reading [http://docs.ansible.com/ansible/playbooks\_best\_practices.html#directory-layout](http://docs.ansible.com/ansible/playbooks_best_practices.html#directory-layout)

ansible  
-filter\_plugins  
-group\_vars  
-host\_vars  
-library  
-roles

Then I have the playbook file like “fileserver.example.com.yml”

Where should I store my config files for [fileserver.example.com](http://fileserver.example.com)? There is no “files” folder in ansible root. For example, where do a store smb.conf that is only meant for [fileserver.example.com](http://fileserver.example.com)?

Do I just create the following?

ansible  
-filter\_plugins  
-group\_vars  
-host\_vars  
-library  
-roles  
-files  
-fileserver.example.com  
-etc  
-samba  
-smb.conf

Would this be best practice? Need advice.

Similarly for templates too. Where do I store the templates for [fileserver.example.com](http://fileserver.example.com)?

My objective is to change the config files locally and run ansible to change them in the server. Not sure how to organize it all. Especially when there are a few servers. Most of the servers are unique and independent.

I hope, I am making sense and it is clear.

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [April 9, 2016, 5:50pm UTC](https://forum.ansible.com/t/newbie-need-best-practice-advice-on-ansible-used-as-configuration-manager/21111/2 "2016-04-09T17:50:27Z")

</div>

In your situation I would avoid having separate configuration files as  
much as possible. I would go for a template for e.g. smb.conf, that  
fits all hosts. I would guess this file is rather similar on all your  
servers...

Johannes

---

<div class="post-metadata">

**Author:** ![Anthony\_P\_V](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@Anthony\_P\_V](https://forum.ansible.com/u/Anthony_P_V)\
**Post date:** [April 12, 2016, 6:08pm UTC](https://forum.ansible.com/t/newbie-need-best-practice-advice-on-ansible-used-as-configuration-manager/21111/3 "2016-04-12T18:08:39Z")

</div>

Thank you for the advice. I will try to make smb.conf as a template.
