THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

How to reclaim or unreserve IP Address using Ansible?

New Member
Posts: 1
4563     0

Hi ,

 

Can somone help me in giving an insight on unreserve or reclaim IP address for infoblox using Ansible module?

 

Regards,

Vishal

 

 

Re: How to reclaim or unreserve IP Address using Ansible?

New Member
Posts: 2
4564     0

I would also like to know how to reclaim addresses using Ansible.  Any help will be greatly appreciated.

Re: How to reclaim or unreserve IP Address using Ansible?

Adviser
Posts: 181
4564     0

Hi,

 

If you would like to delete a fixed address, you can do so using the below playbook sample. The state parameter indicates that the mentioned fixed address needs to be reclaimed.

---

- hosts: localhost
  vars:
    nios_provider:
      host: grid-master
      username: admin
      password: pwd

  connection: local
  tasks:
   - name: delete ipv4 dhcp fixed address
     nios_fixed_address:
       name: ipv4_fixed
       ipaddr: 1.1.1.10
       mac: 08:6d:41:e8:fd:e8
       network: 1.1.1.0/24
       network_view: default
       state: absent
       provider: "{{ nios_provider }}"

Thanks & Regards,

Krishna Vasudevan

Re: How to reclaim or unreserve IP Address using Ansible?

New Member
Posts: 2
4564     0

Hi Krishna,

 

Thank you for your response.

 

In situations where there are multiple record types (A, PTR, TXT) tied to an address, is there a playbook that can be run to clear all the records at once by reclaiming the IP address?

Re: How to reclaim or unreserve IP Address using Ansible?

New Member
Posts: 1
4564     0

I want to reclaim IP from Infoblox with ansible: It works fine with DHCP Fixed address.  But I need to remove IP those are not having mac info with it.

 

I tried this module:

- name: Remove ip from host record
  infoblox.nios_modules.nios_host_record:
    provider: "{{ nios_provider }}"
    name: "{{ hostname }}"
    ipv4:
      - address: "{{ ip }}"
        remove: true
    view: "{{ view_name }}"
    state: absent
  ignore_errors: true
 
I am getting Error :
A host record requires at least one IP address.
 
How will I remove it
Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin