community.general.nios_zone – Configure Infoblox NIOS DNS zones¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.nios_zone
.
Synopsis¶
Adds and/or removes instances of DNS zone objects from Infoblox NIOS servers. This module manages NIOS
zone_auth
objects using the Infoblox WAPI interface over REST.
Requirements¶
The below requirements are needed on the host that executes this module.
infoblox-client
Parameters¶
Notes¶
Note
This module must be run locally, which can be achieved by specifying
connection: local
.Please read the Infoblox Guide for more detailed information on how to use Infoblox with Ansible.
Examples¶
- name: Configure a zone on the system using grid primary and secondaries
community.general.nios_zone:
name: ansible.com
grid_primary:
- name: gridprimary.grid.com
grid_secondaries:
- name: gridsecondary1.grid.com
- name: gridsecondary2.grid.com
restart_if_needed: true
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Configure a zone on the system using a name server group
community.general.nios_zone:
name: ansible.com
ns_group: examplensg
restart_if_needed: true
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Configure a reverse mapping zone on the system using IPV4 zone format
community.general.nios_zone:
name: 10.10.10.0/24
zone_format: IPV4
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Configure a reverse mapping zone on the system using IPV6 zone format
community.general.nios_zone:
name: 100::1/128
zone_format: IPV6
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Update the comment and ext attributes for an existing zone
community.general.nios_zone:
name: ansible.com
comment: this is an example comment
extattrs:
Site: west-dc
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove the dns zone
community.general.nios_zone:
name: ansible.com
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove the reverse mapping dns zone from the system with IPV4 zone format
community.general.nios_zone:
name: 10.10.10.0/24
zone_format: IPV4
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
Authors¶
Peter Sprygada (@privateip)