'Provisioning with Ansible and Vagrant multiple vagrantfiles

I'm creating a monitoring environment that has monitoring_servers and monitored_boxes, and of course Ansible controller. For testing roles etc I've created a new "project" that worked well in terms of organizing the development. But now, when most of the stuff is (hopefully) working as should I would love to get the whole Infrastructure easier to manage, if possible, from one file state.

I've been googling this every now and then and IIRC I still haven't found a solution to have one master Vagrantfile which then could call other Vagrantfiles to kickstart needed boxes.

Now there is one Vagrantfile for creating Ansible Controller, 3 ubuntu nodes and 3 Windows nodes, and another to spin up three Ubuntu VM's for Grafana, Loki, and Prometheus. Then there would be needs for an Alert manager, maybe for Influxdb, etc, and keeping all those machines in one vagrant file haven't worked very well for me as I would like to see a situation where there is: Vagrantfile (master) to create Ansible Controller and from that file, I could call files like "monitoring_stack", "monitored_boxes", "common_purpose_boxes" and so on.

Master
├── Vagrantfile.ansible.controller
└── monitoring
    ├── monitored_boxes
    │   └── Vagrantfile.monitored
    ├── monitoring_servers
    │   └── Vagrantfile.monitoring
    └── whatever_boxes
        └── Vagrantfile.whatever

Something like that would be an ideal setup to manage.

If that's not doable nor easy to get to are there other methods you normally take to tackle similar setups?

Maybe just forget the whole Vagrant and go full-on with Pulumi or Terraform. Then again, that probably wouldn't solve this issue either as I want to provide a playground for other team members also to test and play with new toys.

Thanks, everyone for any tips :)



Solution 1:[1]

Hopefully I'm not too late.

Vagrant supports multi-nodes setup, within the same Vagrantfile:

https://www.vagrantup.com/docs/multi-machine

I'm currently working on a dual-node setup with ansible provisioning (WIP):

https://gitlab.com/UnderGrounder96/gitlab_jenkins

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Under Grounder