Reply
Highlighted

Using ansible to create DHCP range

wpmartin
Techie
Posts: 1
8443     0

Hello all,

 

I have been trying out the new infoblox integrations with Ansilbe 2.5 and can't seem to find anything for setting up a dhcp range inside the networks I setup in infoblox with the playbook below. Am I missing something?

 

Example playbook follows.

 

---
- hosts: ipam-01
  connection: local
  tasks:
    - nios_network:
        network: "{{ item.network }}"
        comment: "{{ item.comment }}"
        extattrs:
           Site: YYY
        options:
         - name: domain-name
           value: xxxxx.com
        state: present
        provider:
          host: ipam01.xxxxx.com
          username: username
          password: somepass
      loop:
        - { network: xx.xx.xx.xx/24, comment: 'Site - Main' }
        - { network: xx.xx.xx.xx/24, comment: 'Site - Phones' }

 

 

Re: Using ansible to create DHCP range

TTiscareno Community Manager
Community Manager
Posts: 361
8444     0

For Ansible 2.5, the NIOS modules includes NIOS_Network which allows you to create networks but this does not include support for DHCP ranges. The reason for this is that a range is not required for Ansible as a network alone is enough to enable it to pull next available IP address for the given subnet. If you create a network and then a Host record pulling an address from that network, it will work. A DHCP range would only be needed to support actual DHCP clients.

 

Regards,

Tony

Re: Using ansible to create DHCP range

nanisyako
Techie
Posts: 2
8444     0

what if I want to configure a dhcp range for a vlan? why I just can't add another task for example to vlan provsioning. is it in the road-map?

Re: Using ansible to create DHCP range

perrymoran
Techie
Posts: 1
8444     0

Useful information, thanks!

Showing results for 
Search instead for 
Do you mean 

Recommended for You