Skip to content
Snippets Groups Projects
Commit 8b49d661 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add basic checking for network_interface to prechecks"

parents edf0d99d a01b803b
No related branches found
No related tags found
No related merge requests found
......@@ -448,3 +448,19 @@
failed_when: "'169.254.' not in kolla_internal_vip_address and \
kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
when: enable_haproxy | bool
- name: Checking the network_interface is present
fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'"
when: network_interface not in ansible_interfaces
- name: Checking the network_interface is active
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'"
when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True
- name: Checking the network_interface configuration
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'"
when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined
- name: Checking the network_interface ip address configuration
fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'"
when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined
---
features:
- Add some extra prechecks to ensure a sane NIC config.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment