Ansible Provisioner use groups_vars and host_vars along with Vagrant generated inventory file

14 views
Skip to first unread message

Sohom Bhattacharjee

unread,
Mar 5, 2019, 11:04:04 AM3/5/19
to Vagrant
hi,

I have a for loop in my vagrant file that initializes and provisions a bunch of systems which essentially form a cluster.

Now, I want to run an ansible playbook on all of these machine but since these machines are created based on the for-loop I can not use a static inventory reliably.

Furthermore, using the inventory file generated by vagrant does not work since ansible does not have access to the variables in host_vars and group_vars as we are using the same ansible playbooks for out CI/CD as well.

I am lost on what to do now. I am looking for ideas ..
Reply all
Reply to author
Forward
0 new messages