NIOS Modules for Ansible Collections
Infoblox NIOS Modules for Ansible Collections include a set of NIOS modules, lookup plug-ins, roles, and playbooks. The NIOS modules enable you to automate the management operations performed on NIOS objects and the inventory and lookup plug-ins allow you to retrieve data from NIOS to Ansible.
Configure the collection in an Ansible playbook (a .yml file) by referencing the collection content by its fully qualified collection name according to the operation it must perform.
The following playbook samples reference infoblox.nios_modules.nios_a_record
for creating an A record:
Sample using authentication with NIOS credentials:
connection: local
tasks:
- name: Create Nios A record Test
infoblox.nios_modules.nios_a_record:
name: ansible.testzone.com
view: ansibleDnsView
ipv4: 192.168.11.251
comment: Created with Ansible
state: present
provider:
host: <nios_hostname_or_hostip>
username: <nios_username>
password: <nios_password>
Sample using Certificate-based authentication:
connection: local
tasks:
- name: Create Nios A record Test
infoblox.nios_modules.nios_a_record:
name: ansible.testzone.com
view: ansibleDnsView
ipv4: 192.168.11.251
comment: Created with Ansible
state: present
provider:
host: <nios_hostname_or_hostip>
cert: "<absolute_path_for_client.cert.pem>"
key: "<absolute_path_for_client.key.pem>"
Note
To perform manage operations on a NIOS cloud platform member, specify the following when configuring a playbook:
Credentials of an admin account that is assigned to the admin group cloud-api-only and has read-write permissions on each NIOS object it must manage.
Extensible attributes
Tenant ID
,CMP Type
, andCloud API Owned
.
For details on NIOS modules and plug-ins, see the following topics:
Consider the following points when working with NIOS modules:
You must run the NIOS modules and plug-ins locally by specifying
connection:local
.All NIOS modules (other than plug-ins) support the create, update, and delete operations. For the create and update operations, set the
status
parameter topresent
and for the delete operation, set it toabsent
.All NIOS modules related to resource records have
ttl
as a common parameter. This optional parameter specifies the time the data is cached in the DNS server before the data is updated.All NIOS modules have the optional parameter
extattrs
, which specifies extensible attributes. The parameter supports create, update, and delete operations.
To remove the configured extensible attributes, specify an empty dictionary as shown in the following example of an A record:name: Delete extattrs for nios a record
infoblox.nios_modules.nios_a_record:
name: sample.testzone.com
view: extra
ipv4: 12.10.0.18
extattrs: {}
comment: Created with Ansible
state: present
provider: "{{ nios_provider }}"
All NIOS modules and plug-ins have the following common parameters:
comment
: Text that describes the module or plug-in.provider
: A dictionary object that contains details of connections. You can include the following subparameters:
Subparameter | Required/Optional | Description |
---|---|---|
| Required | Specifies the DNS host name or IP address for connecting to the remote |
| Required | Specifies the user name to use for authenticating the connection to the remote instance of NIOS. |
| Required | Specifies the password to use for authenticating the connection to the remote instance of NIOS. |
| Required | Specifies the absolute path to the X.509 certificate in .PEM format required for authenticating the connection to the remote instance of NIOS. |
| Required | Specifies the absolute path to the certificate key required for authenticating the connection to the remote instance of NIOS. |
| Optional | Specifies whether to enable the verification of SSL certificates. The default value is |
| Optional | Specifies the wait time for receiving a response. The default value is |
| Optional | Specifies the number of retries to attempt before the connection is declared usable. The default value is |
| Optional | Specifies the maximum number of objects to be returned; if the parameter is set to a negative number, the appliance returns an error when the number of returned objects exceeds the set value. The default value is |
| Optional | Specifies the version of WAPI to use. The default value is |
| Optional | Specifies the maximum number of connections to save in the pool. The default value is |
| Optional | Specifies the number of urllib3 connection pools to cache. The default value is |
| Optional | Specifies whether the SSL warnings are enabled or disabled. When the value is set to |