Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps


MS DHCP - IPv4 Fixed Address via Ansible

New Member
Posts: 2
718     1

I recently had one of my customers reach out with an interesting use case for using Ansible to create an ipv4 fixed address. We have a module to do this when using Infoblox as the DHCP server and that is pretty straighforward. This particular customer uses MS DHCP. They have Infoblox for authoritative IPAM and use the R/W feature of the MS Management license so they can manage their DHCP environment from the IB GUI.


This is easily accomplished via the GUI where you can select the MS server when creating the fixed address.

Screen Shot 2022-03-30 at 10.03.53 AM.png


Similarily it can be accomplished via API but they were trying to understand how to do it via Ansible.


What I learned is, if you need to automate Infoblox objects that are not a part of the 16 modules supported in the NIOS collection, you need to use the uri module that is part of ansible-base and included in all Ansible installations. It allows you to interact with HTTP and HTTPS web services. More information can be found here:


I tested and validated the below and shared with the customer:


- hosts: localhost


    host: 192.168.2.##

    username: admin

    password: pwd1234

    wapi_version: 'v2.12'


  connection: local


    - name: configure ipv4 dhcp fixed address


        url: "https://{{ host }}/wapi/{{ wapi_version }}/fixedaddress"

        user: "{{ username }}"

        password: "{{ password }}"

        validate_certs: no

        return_content: yes

        method: POST

        force_basic_auth: yes

        status_code: 201, 302, 200


          Content-Type: "application/json"



          mac: aa:bb:cc:dd:ee:ff

          name: Test_Ansible_FA



        body_format:  json


Probably not a common use case but wanted to share as I wasn't able to find something similar. Feel free to use and modify to meet your needs.



Scott Baker

Infoblox Sr Solutions Architect



Showing results for 
Search instead for 
Did you mean: 

Recommended for You