This repo hosts the infoblox.universal_ddi
Ansible Collection.
The collection provides modules to automate your Universal DDI (DHCP, DNS and IPAM) and Infoblox Cloud objects hosted in the Infoblox Portal.
Note: This collection replaces the legacy B1DDI collection. The Universal DDI collection is a complete rewrite of the B1DDI collection and provides a more robust and feature-rich set of modules to manage Infoblox Universal DDI resources.
We recommend migrating from the legacy B1DDI Collection since they will be deprecated in the near future. Please expect a few breaking changes while migrating from legacy modules to the new collection modules. A migration guide will be published soon to help you with the migration process.
The complete information regarding the collection and the supported modules can be found in the documentation.
Installing the Collection from Ansible Galaxy
To install the Universal DDI Collection, you can use the ansible-galaxy
command line tool:
ansible-galaxy collection install infoblox.universal_ddi
You can also include it in a requirements.yml
file and install it via ansible-galaxy collection install -r requirements.yml
using the format:
collections:
- name: infoblox.universal_ddi
You can also clone the git repository and use the collection directly:
mkdir -p ~/ansible_collections/infoblox/universal_ddi
git clone https://github.com/infobloxopen/universal-ddi-ansible.git ~/ansible_collections/infoblox/universal_ddi
- Required Ansible version: 2.15 or later
- Required Python version: 3.9 or later
The collection also requires the following Python Libraries to be installed:
- requests >= 2.32.0
- universal-ddi-python-client >= 0.1.0
Installing collection does not install any required third party Python libraries or SDKs. The user needs to install the required Python libraries using following command:
pip install -r requirements.txt
If you are working on developing and/or testing Infoblox Universal DDI collection, you may want to install additional requirements using following command:
pip install -r test-requirements.txt
The default URL for the Cloud Services Portal is https://csp.infoblox.com
. If you need to change this, you can pass the portal_url
as a part of modules_defaults
in the playbook. For example:
module_defaults:
group/infoblox.universal_ddi.all:
portal_url: "{{portal_url_value}}"
You can also set the URL using the environment variable INFOBLOX_PORTAL_URL
or BLOXONE_CSP_URL
.
Note:
BLOXONE_CSP_URL
is deprecated and will be removed in future releases. It is recommended to useINFOBLOX_PORTAL_URL
instead.
An API key is required to access Infoblox API. You can obtain an API key by following the instructions in the guide for Configuring User API Keys.
To use an API key with Infoblox API, you can pass the portal_key
as a part of modules_defaults
in the playbook . For example:
module_defaults:
group/infoblox.universal.all:
portal_key: "{{portal_key_value}}"
Alternatively, You can also set the API key using the environment variable INFOBLOX_PORTAL_KEY
or BLOXONE_API_KEY
.
Note:
BLOXONE_API_KEY
is deprecated and will be removed in future releases. It is recommended to useINFOBLOX_PORTAL_KEY
instead.
Note: The API key is a secret and should be handled securely. Hardcoding the API key in your code is not recommended.
The following example demonstrates how to use the infoblox.universal_ddi
collection to create a DNS Auth Zone inside a View.
- hosts: localhost
gather_facts: no
module_defaults:
group/infoblox.universal_ddi.all:
portal_url: "{{portal_url_value}}"
portal_key: "{{portal_key_value}}"
tasks:
- name: Create a DNS View
infoblox.universal_ddi.dns_view:
name: "example_view"
state: present
register: dns_view
- name: Create a new DNS Auth Zone
infoblox.universal_ddi.dns_auth_zone:
fqdn: "example.com"
primary_type: "cloud"
view: "{{ dns_view.id }}"
state: present
Demo usage for each module can be found in the Examples
section of the module documentation.
For detailed information about the latest updates, new features, bug fixes, and improvements, please visit our Changelog
If you have any questions or issues, you can reach out to us using the following channels:
- Github Issues:
- Submit your issues or requests for enhancements on the Github Issues Page
- Infoblox Support:
- For any questions or issues, please contact Infoblox Support.
- Official Infoblox Documentation
- Infoblox API Documentation