Files
kayobe/ansible/roles/ip-allocation/tasks/main.yml
Mark Goddard d1f3ef3028 Install package dependencies in ip-allocation role
These are required by the ip_allocation role.
2017-07-26 17:45:26 +00:00

22 lines
628 B
YAML

---
- name: Ensure package dependencies are installed
local_action:
module: yum
name: "{{ item }}"
state: installed
become: True
with_items:
- python-netaddr
- PyYAML
- 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 }}"