CloudForms with Infoblox using Ansible Part 1: Prerequisites

In this blog series, we will cover how to integrate Infoblox IPAM with  Red Hat CloudForms using Ansible Playbooks. Before we start, let me point you that we already have a detailed blog on  CloudForms with Infoblox integration written by John Hardy[1] which has explained how to integrate CloudForms with Infoblox using Ruby scripts. 

Now the question is if we already have a detailed blog on this then what new I would bring to this blog? 

The new would be the power of Ansible that makes the integration simpler and effective. Not only Ansible is compatible with newer versions of CloudForms but also with the addition of Infoblox to ansible modules make this whole process a cakewalk.

Use Case

Many organisations use IPAM software like Infoblox which provides IP address management and services like DHCP, DNS for any size of network. So instead of using out-of-the-box IP management service offered by CloudForms, we can outsource this service to Infoblox and make it part of provisioning workflow with the help of ansible playbooks.

After integration, we should successfully able to perform below two functionalities i.e.

  1. It should get the IP from the Infoblox and assign the IP to the VM getting provisioned.
  2. Update the DNS record in Infoblox and assign the same host details to the provisioned VM.


Implementing the Use Case:

To start the implementation, let’s divide the work into three sections i.e.

  1. Installing and Configuring Infoblox client in CloudForms appliance.
  2. Playbooks creation and make it a part of provisioning workflow.
  3. Executing it via Service Catalog.

Installing and configuring Infoblox client in CloudForms Appliance

In order to install/configure Infoblox client, make sure you have ansible 2.5 or higher version installed in your CloudForms appliance. 

If you are implementing this solution in CloudForms 4.7, then you don’t  need to worry about the ansible version as it already has ansible 2.7 installed.

Next step is to install pip which would help in installing infoblox-client i.e.

#pip install infoblox-client

Also, you need to setup the python path in your CloudForms appliance like below:

export PYTHONPATH=/opt/rh/python27/root/usr/lib/python2.7/site-packages

Lastly,  Make sure you put the details of Infoblox server i.e. hostname and credentials in your CloudForms appliance so that it can be further consumed by playbooks as vars_files. For example, I have added Infoblox server details under /vars/host.yaml file in my CloudForms appliance like below:



  host: <Infoblox server IP/hostname>

  username: <username>

  password: <password>

In the next post we will cover the playbooks needed for this.

Leave a Reply

Your email address will not be published. Required fields are marked *