Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a_record cannot be removed without ipv4addr #138

Open
gpettey-ercot opened this issue Aug 24, 2022 · 1 comment
Open

a_record cannot be removed without ipv4addr #138

gpettey-ercot opened this issue Aug 24, 2022 · 1 comment

Comments

@gpettey-ercot
Copy link

I want to remove an A record. I don't care what the address on it is, I just want the record(s) gone.

- name:        remove A
  delegate_to: localhost
  infoblox.nios_modules.nios_a_record:
    provider: "{{ nios_provider }}"
    name:     anexample.com
    state:    absent

throws FAILED! => {"changed": false, "msg": "missing required arguments: ipv4addr"}.

@runejuhl
Copy link

This module seems a bit half baked, but if you want to do this you could do a lookup first to get the IPv4 addresses associated with the records, then amend the call to infoblox.nios_modules.nios_a_record with the IP addresses.

If you use lookup('infoblox.nios_modules.nios_lookup', 'record:host', provider={...}, filter={'name': 'anexample.com'}), then the information will be contained within the ipv4addrs key in the resulting hash-map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants