kayobe/ansible/roles/ip-allocation/tasks/main.yml
Mark Goddard ead380c4d0 Add support for allocation pools to IP allocation role
Only allocate IPs from within the allocation pool range.
2017-02-16 10:44:29 +00:00

12 lines
438 B
YAML

---
- name: Ensure IP addresses are allocated
local_action:
module: ip_allocation
allocation_file: "{{ ip_allocation_filename }}"
hostname: "{{ ip_allocation_hostname }}"
net_name: "{{ item.net_name }}"
cidr: "{{ item.cidr }}"
allocation_pool_start: "{{ item.allocation_pool_start | default(omit) }}"
allocation_pool_end: "{{ item.allocation_pool_end | default(omit) }}"
with_items: "{{ ip_allocations }}"