Directory structure

The following files and directories are the main components of this Multi-VM Vagrant environment.

.../ansible-development/
    ├── provisioning/
    │   ├── roles/
    │   │   ├── coglinev3.ansible-common
    │   │   ├── coglinev3.vagrant-ansible-init
    │   │   │   ...
    │   │   └── your_ansible_role 
    │   ├── bootstrap.yml
    │   ├── inventory.ini
    │   ├── requirements.yml
    │   ├── test-playbook
    │   └── vagrant.ini
    ├── config.yml
    └── Vagrantfile

  • config.yml: You can use config.yml to define the nodes to use and to make global settings for the Vagrant environment without modifying the Vagrantfile.
  • Vagrantfile: Every Vagrant environment needs a Vagrantfile. The primary function of the Vagrantfile is to describe the type of machines required for a project, and how to configure and provision these machines.
  • provisioning/bootstrap.yml: Ansible playbook for initial provisioning of all nodes, including the master node.
  • provisioning/requirements.yml: This file contains the required Ansible roles needed by bootstrap.yml.
  • provisioning/inventory.ini: Manually configured Ansible inventory file that is used only if the dynamic_inventory option is set to false in config.yml (see Configuration Options).
  • provisioning/roles: Directory for the Ansible Roles.
  • provisioning/test-playbook: Shell script for testing new playbooks and roles
  • provisioning/vagrant.ini: Dynamically configured Ansible inventory file used when config.yml has the dynamic_inventory option set to true, which is the default (see Configuration Options).

Mountpoint /vagrant

Within the ansible management node, called master, the host directory <your_path>/ansible-development is provided under the path /vagrant.