From 717ea1377b253d3d4bfdfcc0713b646a2ef00865 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 4 Jan 2024 11:57:24 -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/tests_include_vars_from_parent.yml | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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/tests_include_vars_from_parent.yml b/tests/tests_include_vars_from_parent.yml index af30cbaf..c5d5cd09 100644 --- a/tests/tests_include_vars_from_parent.yml +++ b/tests/tests_include_vars_from_parent.yml @@ -1,5 +1,5 @@ --- -- name: Test role variable override +- name: Test role include variable override hosts: all gather_facts: true tasks: @@ -38,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.logging + + - name: Cleanup + file: + path: "{{ item.dest }}" + state: absent + loop: "{{ __varfiles_created.results }}" + delegate_to: localhost + when: inventory_hostname == ansible_play_hosts_all[0]