diff --git a/ansible/roles/openshift-4-cluster/tasks/create-network.yml b/ansible/roles/openshift-4-cluster/tasks/create-network.yml index 00438fd3..4249e05a 100644 --- a/ansible/roles/openshift-4-cluster/tasks/create-network.yml +++ b/ansible/roles/openshift-4-cluster/tasks/create-network.yml @@ -4,6 +4,13 @@ # src: templates/network.xml.j2 # dest: network.xml +- name: Check IPv6 + fail: + msg: "IPv6 is enabled via ip_families but your Host system do not have a public IPv6 subnet configured." + when: + - "'IPv6' in ip_families" + - hostvars['localhost']['ansible_default_ipv6'] | length == 0 + - name: Build IPv6 subnet set_fact: vn_subnet_ipv6: "{{ hostvars['localhost']['ansible_default_ipv6']['address'].split(':')[:4] | join(':') | string}}:{{ '%x' % vn_subnet.split('.')[2] | int }}"