infobloxopen / infoblox-ansible

Ansible modules for interfacing to Infoblox systems
GNU General Public License v3.0
54 stars 61 forks source link

Update Name of Host Record Fails if DNS Bypassed #230

Open dlehrman opened 2 months ago

dlehrman commented 2 months ago

Attempts to update the name of an existing host record that was created with configure_for_dns: false fail to find the existing record.

Given the example at https://docs.ansible.com/ansible/latest/collections/infoblox/nios_modules/nios_host_record_module.html#ansible-collections-infoblox-nios-modules-nios-host-record-module (configure_for_dns: false added by me):

- name: Update an ipv4 host record
  infoblox.nios_modules.nios_host_record:
    name: {new_name: host-new.ansible.com, old_name: host.ansible.com}
    ipv4:
      - address: 192.168.10.1
    configure_for_dns: false
    state: present
    provider:
      host: "{{ inventory_hostname_short }}"
      username: admin
      password: admin
  connection: local

If host.ansible.com had been created with with configure_for_dns: false, the task will fail with an error message stating the record could not be found.