summaryrefslogtreecommitdiffstats
path: root/roles/etcd_common/tasks/main.yml
blob: cd108495dc7cb030bca0902c30bf8c729509a9d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
---
- set_fact:
    etcd_host_int_map: "{{ lookup('template', '../templates/host_int_map.j2') | from_yaml }}"

- fail:
    msg: "Interface {{ item.value.etcd_interface }} not found on host {{ item.key }}"
  when: "'etcd_interface' in item.value and 'interface' not in item.value"
  with_dict: etcd_host_int_map

- fail:
    msg: IPv4 address not found for {{ item.value.interface.device }} on host {{ item.key }}
  when: "'ipv4' not in item.value.interface or 'address' not in item.value.interface.ipv4"
  with_dict: etcd_host_int_map