mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
The big problem was trying to use `vars` with `import_playbook`. We do not need to use `import_playbook` when `include_tasks` will work. Perhaps the original author of these tests thought that the play `roles` keyword was the only way to invoke roles, so that had to be "called" using an `import_playbook`? Use `include_tasks` instead of `import_playbook`, and move some of those "tasks" playbooks to be tasks files in tests/tasks. Use `include_role` instead of `import_role`. Do not set variables using `set_fact` if they have already been set at the appropriate scope using `vars`. "Modernize" the code somewhat. Improve formatting. Work around an Ansible bug https://github.com/ansible/ansible/issues/85394 Fix ansible-lint and ansible-test issues related newer versions of those tools. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
9 lines
222 B
YAML
9 lines
222 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: Remove {{ profile }}
|
|
include_role:
|
|
name: linux-system-roles.network
|
|
vars:
|
|
network_connections:
|
|
- name: "{{ profile }}"
|
|
persistent_state: absent
|