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

Cannot inherit EAs from parent network while creating a host record #174

Closed
nikhilsharma343 opened this issue Feb 24, 2023 · 5 comments
Closed

Comments

@nikhilsharma343
Copy link

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 }}"
@robertattenberger
Copy link

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.

@johnrmarley
Copy link

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

@pcunning-rh
Copy link

+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.

@SanjeevManurkar
Copy link

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

@JkhatriInfobox
Copy link
Collaborator

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.

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

6 participants