Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

Ansible for Infoblox

Ansible for Infoblox

Configure Ansible for Infoblox

Install Python3 on RHEL

https://developers.redhat.com/blog/2018/08/13/install-python3-rhel/#why-rhscl

$ su -
# subscription-manager repos --enable rhel-7-server-optional-rpms \
  --enable rhel-server-rhscl-7-rpms
# yum -y install @development
# yum -y install rh-python36

# yum -y install rh-python36-numpy \
 rh-python36-scipy \
 rh-python36-python-tools \
 rh-python36-python-six

Instal Python3 on Centos

# yum install -y python3

Setup Python VirtualEnv (venv)

$ scl enable rh-python36 bash
$ python3 -V
Python 3.6.3

$ python -V  # python now also points to Python3
Python 3.6.3

$ mkdir ~/pydev
$ cd ~/pydev

$ python3 -m venv py36-venv
$ source py36-venv/bin/activate

(py36-venv) $ python3 -m pip install ...some modules...

DONOT Upgrade pip to Latest !!!

$ python -m pip install pip==20.2.3

Install Ansible

## install required packages
pip install wheel setuptools rust etc

pip install ansible

Install infoblox Client

pip install infoblox-client

Infoblox API References

Find the WAPI documentation from https://<GRID_IP_ADDRESS>/wapidoc/ url.

## list WAPI versions
https://10.10.10.10/wapi/v1.0/?_schema

## samples
https://10.6.1.216/wapi/v2.7/networkview?name=default
https://10.6.1.216/wapi/v2.7/networkview?name=default&_return_type=json

## get the rpz url entry
https://{{ infoblox_wapi_server }}/wapi/{{ infoblox_wapi_version }}/allrpzrecords?zone={{ infoblox_rpz_name }}&_return_fields%2B=rpz_rule&_return_as_object=1&name={{ infoblox_url_name_to_add }}"

Sample API Calls

$ curl -k -s \
  -H 'content-type: application/json' \
  -X POST \
  --user admin:adminadmin \
  "https://10.6.1.216/wapi/v2.7/record:rpz:a?_return_fields%2B=name,rp_zone&_return_as_object=1" \
  -d '{"name":"serverblock.com.category-01","ipv4addr":"1.1.1.156","rp_zone":"category-01"}'

  "https://10.6.1.216/wapi/v2.11/record:rpz:a?_return_fields%2B=name,rp_zone&_return_as_object=1"

Appendix

About Infoblox vNIOS Virtual Appliance for Microsoft Hyper-V

Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

Ansible

Ansible awx cli

Note: This notes are based on the AAP 2.5 Installation # On Red Hat Enterprise Linux 8, the Controller CLI can be installed via dnf: dnf install …

Red hat

Red Hat Knowledge Base

Reference Documents for Red Hat Products Red Hat Subscription Management Cheatsheet sosreport methods Subscription Reference Troubleshooting Failed to …

Infoblox Virtual Appliance Setup (NIOS)

Infoblox Virtual Appliance Setup (NIOS)

Installing the NIOS Virtual or Reporting Virtual Appliance Infoblox Guide Automate Infoblox Infrastructure Using Ansible Ansible and Infoblox: Roles …

Ansible

Azure Certifications

Microsoft Certified: Security, Compliance, and Identity Fundamentals Manage identity and access in Azure Active Directory Zero Trust Guidance Center …

Ansible

Ansible Collections

Installing collections Using Collection on Tower References Installing collections ansible-galaxy collection install my_namespace.my_collection or

Red hat

RHEL to Active Directory

Reference Documents for Red Hat to Active Directory Connection Disjoin from AD