# ansible-pull query

**URL:** <https://forum.ansible.com/t/ansible-pull-query/26652>\
**Category:** Ansible Project\
**Created:** [February 3, 2018, 3:59pm UTC](https://forum.ansible.com/t/ansible-pull-query/26652 "2018-02-03T15:59:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriman\_dharba](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sriman\_dharba](https://forum.ansible.com/u/sriman_dharba)\
**Post date:** [February 3, 2018, 3:59pm UTC](https://forum.ansible.com/t/ansible-pull-query/26652/1 "2018-02-03T15:59:44Z")

</div>

Hello

I am using ansible-pull along with cron to perform hardening and predependencies for my infra. I am managing all the contents of ansible playbooks/roles/inventory in git I am using a seperate directory name templates and have a yml template specific for all apps and defining nodes directly into the git repo main directory by copying the template to hostname yml file of the host . This way I am able to define how my each node takes which configuration changes or based on application.

My issue is as I am creating more number of host yml files inside my git repo directory, I have many files in the infra i have defined and the repo files listing looks messed up, I have local.yml which will be picked up by default if no definitions are made for a host. Is there any chance I can define a directory via ansible-pull to search host definitions only from that directory instead of the main git repo directory.

Thanks

Sri

---

<div class="post-metadata">

**Author:** ![balz.aschwanden](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@balz.aschwanden](https://forum.ansible.com/u/balz.aschwanden)\
**Post date:** [February 14, 2018, 1:41pm UTC](https://forum.ansible.com/t/ansible-pull-query/26652/2 "2018-02-14T13:41:15Z")

</div>

Hi

This could be solved by using a dynamic inventory script. [http://docs.ansible.com/ansible/latest/intro\_dynamic\_inventory.html](http://docs.ansible.com/ansible/latest/intro_dynamic_inventory.html)

This is an executable file which has to print out json. You could use such a script do redirect your clients to the desired directory.
