aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/prechecks/tasks/port_checks.yml
blob: 6fdff37a82258946bed5154f07ec39d3e5f911e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Checking the api_interface is present
  ansible.builtin.assert:
    that: api_interface in ansible_facts.interfaces
    fail_msg: "Please check the api_interface property - interface {{ api_interface }} not found"

- name: Checking the api_interface is active
  ansible.builtin.assert:
    that: hostvars[inventory_hostname].ansible_facts[api_interface | replace('-', '_')]['active']
    fail_msg: "Please check the api_interface settings - interface {{ api_interface }} is not active"

# kolla_address handles relevant address check
- name: Checking the api_interface ip address configuration
  ansible.builtin.assert:
    that: api_interface_address is defined
    fail_msg: "Please check the api_interface settings - interface {{ api_interface }} ip address problem"