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.



Restart DHCP services with ansible?

New Member
Posts: 4
5155     0

As the title suggests, is it possible to restart the DHCP services using ansible with the Infoblox module? I have a playbook that does a whole slew of tasks but this is the one part that I am stuck. I am hoping there is a way since the the entire playbook relies on this. Thanks

Re: Restart DHCP services with ansible?

New Member
Posts: 4
5156     0

I was able to get this figured out by converting the curl API command to the URI method within ansible.


In case anything looks for this. This is what worked for me:


    - name: Restart Infoblox Services
        url: 'https://x.x.x.x/wapi/v2.9/grid/b45lLmNssXN6ZGIkMA:Infoblox?_function=restartservices'
        user: username
        password: password
        method: POST
        body: '{"restart_option": "RESTART_IF_NEEDED"}'
        body_format: json
          Content-Type: "application/json"
        validate_certs: False
      delegate_to: localhost

Re: Restart DHCP services with ansible?

Posts: 30
5156     0

I tried your example and it didn't work.

Reason was that your URL doesn't work when the name of the Infoblox grid was changed.

I found this in another thread:

curl -k1 -u user:password 'https://x.x.x.x/wapi/v2.5/grid'

will give you the _ref-link that is necessary for the URL to work:




Re: Restart DHCP services with ansible?

New Member
Posts: 2
5156     0

You could also use the ansible infoblox module to restart the services:


Complete documentation and installation guide is here:


Showing results for 
Search instead for 
Did you mean: 

Recommended for You