# files alongside group\_vars, instead of in roles/role\_name/files

**URL:** <https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450>\
**Category:** Ansible Project\
**Created:** [June 12, 2014, 12:08pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450 "2014-06-12T12:08:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jepper](https://forum.ansible.com/u/jepper)\
**Post date:** [June 12, 2014, 12:08pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/1 "2014-06-12T12:08:33Z")

</div>

For all my environments there are entire files that lend themselves best to not be templated. Just one per environment will do.

I use roles, and my directory structure is as follows

├── env\_iodtest [directory]

│ ├── group\_vars [directory]

│ │ └── all [file]

│ └── inventory [file]

├── install.yml [file]

└── roles [directory]

├── install\_base [directory]

│ └── tasks [directory]

│ └── main.yml [file]

It would make sense, for now at least, to have this file inside each of my environments so we have

├── env\_iodtest [directory]

│ ├── group\_vars [directory]

│ │ └── all [file]

│ ├── files [directory - proposed]

│ │ └── vast.list.of.settings [file - proposed]

│ └── inventory [file]

Is this possible?

---

<div class="post-metadata">

**Author:** ![jepper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jepper](https://forum.ansible.com/u/jepper)\
**Post date:** [June 12, 2014, 1:35pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/2 "2014-06-12T13:35:58Z")

</div>

Hacky way that works.

- name: install vast.list.of.settings

copy: src=…/…/…/{{ mule\_environment }}/files/vast.list.of.settings dest={{ mule\_home }}/conf

Good or bad?

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [June 12, 2014, 2:04pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/3 "2014-06-12T14:04:25Z")

</div>

​There's no problem using this. You might want to look if one of the  
special vars help though, to make this cleaner:

​playbook\_dir  
inventory\_dir

---

<div class="post-metadata">

**Author:** ![jepper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jepper](https://forum.ansible.com/u/jepper)\
**Post date:** [June 12, 2014, 2:14pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/4 "2014-06-12T14:14:25Z")

</div>

Yep, {{ inventory\_dir }}/files/blah works. Thanks!

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [June 13, 2014, 6:03pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/5 "2014-06-13T18:03:19Z")

</div>

“For all my environments there are entire files that lend themselves best to not be templated. Just one per environment will do.”

Having trouble parsing what you want to do here.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [June 13, 2014, 6:03pm UTC](https://forum.ansible.com/t/files-alongside-group-vars-instead-of-in-roles-role-name-files/15450/6 "2014-06-13T18:03:38Z")

</div>

Ok, good!
