mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
test asserts: Clarify name
This commit is contained in:
parent
b144a026b4
commit
9b3712cbdf
4 changed files with 8 additions and 5 deletions
|
|
@ -1,7 +1,9 @@
|
|||
# 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 }} is absent"
|
||||
- name: "assert that interface {{ interface }} is absent"
|
||||
assert:
|
||||
that: "{{ not interface in ansible_interfaces }}"
|
||||
msg: "{{ interface }} is in ansible_interfaces: {{ ansible_interfaces }}"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
# need to run setup again when this is just a task to make sure ansible_interfaces is correct
|
||||
# need to run setup again when this is just a task to ensure ansible_interfaces
|
||||
# is current
|
||||
- setup:
|
||||
- name: "assert that {{ interface }} is present"
|
||||
- name: "assert that interface {{ interface }} is present"
|
||||
assert:
|
||||
that: "{{ interface in ansible_interfaces }}"
|
||||
msg: "{{ interface }} is not in ansible_interfaces: {{ ansible_interfaces }}"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
path: "{{ profile_path }}"
|
||||
register: profile_stat
|
||||
|
||||
- name: "assert that {{ profile }} is absent"
|
||||
- name: "assert that profile '{{ profile }}' is absent"
|
||||
assert:
|
||||
that: not profile_stat.stat.exists
|
||||
msg: "profile {{ profile_path }} does exist"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
path: "{{ profile_path }}"
|
||||
register: profile_stat
|
||||
|
||||
- name: "assert that {{ profile }} is present"
|
||||
- name: "assert that profile '{{ profile }}' is present"
|
||||
assert:
|
||||
that: profile_stat.stat.exists
|
||||
msg: "profile {{ profile_path }} does not exist"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue