From 282903d5515c7e65212afe7b5b1a2d1d3a421d50 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 4 Jan 2024 15:24:38 -0700 Subject: [PATCH] ci: support ansible-lint and ansible-test 2.16 Fix yamllint issue with markdownlint config Add cleanup for tests_include_vars_from_parent.yml Signed-off-by: Rich Megginson --- .markdownlint.yaml | 1 + tests/files/envoy-proxy-configmap.yml | 1 + tests/tests_include_vars_from_parent.yml | 12 ++++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 4f8a9799..6bf4ccd9 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,4 @@ +--- # Default state for all rules default: true diff --git a/tests/files/envoy-proxy-configmap.yml b/tests/files/envoy-proxy-configmap.yml index d6970308..2fc77618 100644 --- a/tests/files/envoy-proxy-configmap.yml +++ b/tests/files/envoy-proxy-configmap.yml @@ -1,3 +1,4 @@ +--- apiVersion: v1 kind: ConfigMap metadata: diff --git a/tests/tests_include_vars_from_parent.yml b/tests/tests_include_vars_from_parent.yml index ccdbc226..3431cf17 100644 --- a/tests/tests_include_vars_from_parent.yml +++ b/tests/tests_include_vars_from_parent.yml @@ -1,6 +1,5 @@ -# SPDX-License-Identifier: MIT --- -- name: Test role variable override +- name: Test role include variable override hosts: all gather_facts: true tasks: @@ -39,9 +38,18 @@ varfiles: "{{ [facts['distribution']] | product(separators) | map('join') | product(versions) | map('join') | list + [facts['distribution'], facts['os_family']] }}" + register: __varfiles_created - name: Import role import_role: name: caller vars: roletoinclude: linux-system-roles.podman + + - name: Cleanup + file: + path: "{{ item.dest }}" + state: absent + loop: "{{ __varfiles_created.results }}" + delegate_to: localhost + when: inventory_hostname == ansible_play_hosts_all[0]