Deploy multiple VMware VM with Ansible vmware_guest module
Switch branches/tags
Nothing to show
Clone or download
Latest commit 202d39f Oct 12, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
roles/deploy-vsphere-template/tasks Initial commit Oct 12, 2018
README.md Initial commit Oct 12, 2018
ansible.cfg Initial commit Oct 12, 2018
answerfile.yml Initial commit Oct 12, 2018
deploy-kubernetes-prod.yml Initial commit Oct 12, 2018
vms-to-deploy Initial commit Oct 12, 2018

README.md

Deploy Multiple VMware VM with Ansible

Description

Playbook and role to deploy multiple vSphere virtual machines from a template using Ansible. For more information, you can refer to the related blog post.

Requirements

  • Python (≥ 2.6)
  • Ansible
  • PyVmomi

Configuration

The required files are:

├── ansible.cfg
├── answerfile.yml
├── deploy-kubernetes-prod.yml
├── roles
│   └── deploy-vsphere-template
│       └── tasks
│           └── main.yml
└── vms-to-deploy
  1. Edit the vms-to-deploy file to define the number of virtual machines you want to deploy, as well as their names, datastore, IP and notes.
  2. Edit the answerfile.yml file to set the correct parameter for
    • the infrastructure (where to deploy)
    • the common options for the virtual machines
  3. (optional) Edit the role.

Execution

ansible-playbook -i vms-to-deploy deploy-kubernetes-prod.yml

Enjoy! :)