infoblox-ansible icon indicating copy to clipboard operation
infoblox-ansible copied to clipboard

Cannot inherit EAs from parent network while creating a host record

Open nikhilsharma343 opened this issue 2 years ago • 4 comments

Hi,

Is there a way we can inherit EAs from parent network while creating a host record. I tried use_for_ea_inheritance: true but getting this error, was under impression NIOS inheriting the infoblox-client python module methods?

  • name: Create Host Record       nios_host_record:         name: "{{ user_fqdn }}"         ipv4addrs:           - ipv4addr: "{{ user_ip }}"           - use_for_ea_inheritance: true         state: present         provider:           host: "{{ infoblox_server }}"           username: "{{ infoblox_user }}"           password: "{{ infoblox_pass }}"

nikhilsharma343 avatar Feb 24 '23 10:02 nikhilsharma343

Hello,

I have got basically the same problem, but I use minimal different task-call and get a different error. The result that I cannot inherit EAs from parent network while creating a host record is also the same.

My task-call is the following:

- name: create DNS-host-record
  infoblox.nios_modules.nios_host_record:
    ipv4addrs:
      - ipv4addr: "{{ ip }}"
        use_for_ea_inheritance: true
    name: "{{ fqdn }}"
    provider:
      host: "{{ infoblox_fqdn }}"
      password: "{{ infoblox_password }}"
      username: "{{ infoblox_username }}"
    state: present
delegate_to: localhost

So I leave the "-" ahead of "use_for_ea_inheritance" away. My error message is 'Unsupported parameters for (infoblox.nios_modules.nios_host_record) module: ipv4addrs.use_for_ea_inheritance. Supported parameters include: comment, view (dns_view), configure_for_dns (dns), aliases, state, extattrs, ipv4addrs (ipv4), provider, ipv6addrs (ipv6), ttl, name.'

I was able to fix that problem by doing the following adaption in collections/ansible_collections/infoblox/nios_modules/plugins/modules/nios_host_record.py

@@ -328,7 +328,8 @@ def main():
         configure_for_dhcp=dict(type='bool', required=False, aliases=['dhcp']),
         mac=dict(required=False),
         add=dict(type='bool', required=False),
-        remove=dict(type='bool', required=False)
+        remove=dict(type='bool', required=False),
+        use_for_ea_inheritance=dict(type='bool', required=False)
     )
     ipv6addr_spec = dict(

It would be great, if that or a similar adaption could be done in the official collection. This would affect that everyone could use it and we can upgrade the collection without needing to mention about that adaption.

robertattenberger avatar Mar 31 '23 10:03 robertattenberger

Looks there are a bunch of other parameters listed in the docs that are not supported either. There are eight other use_* parameters in the docs for starters. https://ipam.illinois.edu/wapidoc/objects/record.host_ipv4addr.html

johnrmarley avatar May 24 '23 02:05 johnrmarley

+1 on adding use_for_ea_inheritance=dict(type='bool', required=False) to the nios_host_record.py module, this has helped us with the same issue.

pcunning-rh avatar Aug 02 '24 17:08 pcunning-rh

We will look at this and try to prioritize this ask for upcoming releases.

SanjeevManurkar avatar Aug 20 '24 06:08 SanjeevManurkar

Support for user_for_ea_inheritance has been added in the nios_module as of v1.7.0. The pull request for this feature (#265) has been merged and released.

Therefore, we are closing this issue. If the problem persists, please feel free to reopen it or create a new issue.

JkhatriInfobox avatar Oct 15 '24 11:10 JkhatriInfobox