infoblox-ansible
infoblox-ansible copied to clipboard
nios_host_record reports "changed": false and does not remove Host Record when setting "state": "absent"
The Host Record does exist, and I can search for it in the web interface and find it. If I delete the host record via the web interface, then create it by changing the state: "absent"
into state: "present"
in the task, then run the playbook, I am still unable to to delete it by going back to state: "absent"
in the task, and running the playbook again.
Task in Playbook:
- name: "Ensure Host Record is Absent"
infoblox.nios_modules.nios_host_record:
view: "{{ infoblox_dns_view }}"
name: "{{ inventory_hostname }}"
provider: "{{ infoblox_nios_provider }}"
state: "absent"
connection: "local"
State displayed by ansible-playbook output:
ok: [our-inventory-hostname.a.b.c] => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"invocation": {
"module_args": {
"aliases": null,
"comment": null,
"configure_for_dns": true,
"extattrs": null,
"ipv4addrs": null,
"ipv6addrs": null,
"name": "our-inventory-hostname.a.b.c",
"provider": {
"host": "our-infoblox-appliance.a.b.c",
"http_pool_connections": 10,
"http_pool_maxsize": 10,
"http_request_timeout": 10,
"max_results": 1000,
"max_retries": 3,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"silent_ssl_warnings": true,
"username": "my-username",
"validate_certs": false,
"wapi_version": "2.1"
},
"state": "absent",
"ttl": null,
"view": "Specific DNS View the Host Record is under"
}
}
}
Here is my environment data:
# NIOS Version
8.5.2-409296
#Ansible Version
ansible-playbook 2.10.8
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/my-username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
# InfoBlox nios_modules Version
grep '^======$' --before-context 1 --max-count=1 ~/.ansible/collections/ansible_collections/infoblox/nios_modules/CHANGELOG.rst
v1.2.2
======
+1 on this one.
Running Ansible 2.12 with infoblox.nios_modules collection v1.2.2.
This goes for nios_a_record
as well.
Exact same issue here. The docs clearly say it supports deleting but the functionality does not work.
Same issue. This is with version 1.4.0.
FYI, I tested the 2.9 community-general "nios_host_record" module and it works as expected.