Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

API & Integration


Ansible : add alias to an existing host record

Posts: 1
289     0



I'm able to create a host with an alias using Ansible (based on api rest nios_host_record).

For example, following playbook works perfectly :

    - name: configure an ipv4 host record
        name: HOST-NAME
          - address: IP-ADDRESS
          - HOST-ALIAS
        state: present
        view: "myView"
        provider: "{{nios_provider}}"


Now, I have a host created (with 0, 1 or N aliases) and I just want to add a new alias to this host.

The problem is I don't find how to do it.

If I use the same code and only change "HOST-ALIAS" (to put a new one) ansible says that "HOST-NAME" already exists and generate an error (because nios_host_record wants to create a host record).


So how can I simply create a new alias for an existing host record ?


Thank you.

Re: Ansible : add alias to an existing host record

Posts: 1
290     0

Hello, were you able to solve this. I am facing the same problem.

Showing results for 
Search instead for 
Do you mean 

Recommended for You