I am (relatively) new to ansible and should set up an ansible repository to manage our contiuous integration infrastructure with multiple servers (version control, build, build-agents, ...).
After reading about ansible best practices and layout, I believe that this is ideal:
production
staging
group_vars/...
site.yml
roles/{common,vm,buildserver,buildagent,versioncontrol,...}
The whole infrastructure should run in our vmware cluster, and it seems the vmware_guest module is ideal for most of the vm role.
So the build server should have the vm and buildserver roles.
However, the hostname is only meaningfully after the vm has been created. Also, most likely details like the (unfortunately static) IP etc. should be set as vars, but where? The vm role should use {{ jinja2_vars }} for reusability.
I think I am missing or misunderstanding something.
How do I properly set up the Ansible best pratices repository layout together with VMs and vm roles?