network/tests/tasks/assert-device_present.yml
2019-01-08 17:11:38 +01:00

9 lines
347 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
# need to run setup again when this is just a task to ensure ansible_interfaces
# is current
- setup:
- name: "assert that interface {{ interface }} is present"
assert:
that: "{{ interface in ansible_interfaces }}"
msg: "{{ interface }} is not in ansible_interfaces: {{ ansible_interfaces }}"