Fwd: ansible-pull query

15 views
Skip to first unread message

sriman dharba

unread,
Feb 3, 2018, 11:00:03 AM2/3/18
to ansible...@googlegroups.com
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

Balz.as...@unibas.ch

unread,
Feb 14, 2018, 8:41:15 AM2/14/18
to Ansible Project
Hi

This could be solved by using a dynamic inventory script. 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.
Reply all
Reply to author
Forward
0 new messages