Abiquo has created a dynamic inventory plugin for Ansible. What is Ansible? To summarize using Ansible's own description:
“Ansible is a radically simple IT orchestration engine that automates configuration management, application deployment, and many other IT needs”
The dynamic inventory plugin makes it easy for Abiquo users to automate VM configuration with Ansible. Users with access to Abiquo's API can use it to generate an Ansible inventory file of their resources.
An Ansible inventory file is an INI format text file that contains a host catalog. The host catalog lists the hosts on which you can execute Ansible playbooks (configuration templates).
Here is an example of the inventory file. As you can see, the format is JSON and the host data is grouped in categories.
The most basic category is the host definition itself. It’s just the Abiquo virtual machine name and an IP address:
You can choose which of the host’s IP addresses to use by indicating a specific network interface or just the first public IP assigned to the virtual machine in the Abiquo dynamic inventory plugin configuration file.
Once a basic host entry has been defined, you have different associations that may be useful for applying playbooks in bulk mode:
The next host group is:
This group contains all hosts using the CentOS 6.5 x64 template, so, if we want to apply a package to update all hosts which are using this template, we just need to specify that label in our playbook.
In the same way, you can execute a playbook on all hosts deployed in a Virtual Appliance, which are defined as the children:
For a video demonstration, please see http://www.abiquo.com/2014/05/14/abiquo-dynamic-inventory-plugin-for-ansible/