tripleo-validations/validations/switch-vlans.yaml

31 lines
1.3 KiB
YAML

---
- hosts: undercloud
vars:
metadata:
name: Compare switch port VLANs to VLANs in nic config
description: >
LLDP data received during introspection contains the configured VLANs
for each switch port attached to the nodes interfaces. Compare the
VLAN IDs set on the switch port to those configured in nic config
files. Since the mapping of roles to nodes isn't known prior to
deployment, this check can only check VLANs across all switch ports,
not on a particular switch port.
groups:
- pre-deployment
network_environment_path: environments/network-environment.yaml
tasks:
- name: Get Ironic Inspector swift auth_url
become: true
ini: path=/etc/ironic-inspector/inspector.conf section=swift key=auth_url
register: auth_url
- name: Get Ironic Inspector swift password
become: true
ini: path=/etc/ironic-inspector/inspector.conf section=swift key=password
register: password
- name: Check that switch vlans are present if used in nic-config files
switch_vlans:
path: "{{ network_environment_path }}"
template_files: "{{ lookup('tht') }}"
introspection_data: "{{ lookup('introspection_data',
auth_url=auth_url.value, password=password.value) }}"