Reply

Start DNS service in a grid member

New Member
Posts: 2
1524     2

Hi team,

 

I cant seem to start the DNS service in a gird member, using Ansible:

This is my current playbook:

- name: Get object reference of the DNS service
    ansible.builtin.uri:
      url: "https://{host_IP}/wapi/v2.12.2/request"
      body_format: json 
      user: "admin"
      password: "infoblox"
      validate_certs: no 
      return_content: yes
      method: GET 
      force_basic_auth: yes
      status_code: 200
    register: content

  - name: Use object refence to start DNS service
    ansible.builtin.uri:
      url: "https://{host_IP}/wapi/v2.12.2/{{ content.json[0][\"_ref\"] }}"
      user: "admin"
      password: "infoblox"
      validate_certs: no 
      return_content: yes
      method: PUT
      force_basic_auth: yes
      status_code: 201, 301, 200
      headers:
        Content-Type: "application/json"
      body: 
        enable_dns: true
      body_format: json

Am I missing something, am I doing it correctly?

Re: Start DNS service in a grid member

Superuser
Posts: 38
1524     2

Hi JDuque,

 

In your current playbook you are using request object in the first task. Request object is used to make multiple WAPI requests with one API call. I would suggest using member or member:dns objects to get the list of members on your grid.
Once you have the reference, you can use that object reference and enable dns on that member.

You can check this REST API Guide for better understnading of the Infoblox WAPI

Shukran
Showing results for 
Search instead for 
Did you mean: 

Recommended for You