diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 4f8a979..6bf4ccd 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,4 @@ +--- # Default state for all rules default: true diff --git a/tests/roles/caller/tasks/main.yml b/tests/roles/caller/tasks/main.yml index 5d2433f..8ffb6bb 100644 --- a/tests/roles/caller/tasks/main.yml +++ b/tests/roles/caller/tasks/main.yml @@ -1,9 +1,11 @@ --- # tasks file for caller -- include_role: +- name: Include role + include_role: name: "{{ roletoinclude }}" public: true -- assert: +- name: Test variable override + assert: that: not __caller_override diff --git a/tests/tests_include_vars_from_parent.yml b/tests/tests_include_vars_from_parent.yml index e6325b1..a3290ea 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,6 +38,7 @@ 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: @@ -45,6 +46,15 @@ vars: roletoinclude: linux-system-roles.postgresql - - name: Clean up + - name: Clean up db instance include_tasks: tasks/clean_instance.yml tags: tests::cleanup + + - name: Cleanup + file: + path: "{{ item.dest }}" + state: absent + loop: "{{ __varfiles_created.results }}" + delegate_to: localhost + when: inventory_hostname == ansible_play_hosts_all[0] + tags: tests::cleanup