community.general.nios_a_record – Configure Infoblox NIOS A records¶
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_a_record
.
Synopsis¶
Adds and/or removes instances of A record objects from Infoblox NIOS servers. This module manages NIOS
record:a
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 an A record
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Add a comment to an existing A record
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Remove an A record from the system
community.general.nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: absent
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Update an A record name
community.general.nios_a_record:
name: {new_name: a_new.ansible.com, old_name: a.ansible.com}
ipv4: 192.168.10.1
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
- name: Dynamically add a record to next available ip
community.general.nios_a_record:
name: a.ansible.com
ipv4: {nios_next_ip: 192.168.10.0/24}
state: present
provider:
host: "{{ inventory_hostname_short }}"
username: admin
password: admin
connection: local
Authors¶
Blair Rampling (@brampling)