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 ae5e81d..813b2ae 100644 --- a/tests/roles/caller/tasks/main.yml +++ b/tests/roles/caller/tasks/main.yml @@ -1,8 +1,10 @@ --- # tasks file for caller -- include_role: +- name: Call role + include_role: name: "{{ roletoinclude }}" -- assert: +- name: Assert variable not overridden + assert: that: not __caller_override diff --git a/tests/tests_include_vars_from_parent.yml b/tests/tests_include_vars_from_parent.yml index 4a5a1d8..99565e0 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.pam_pwd + + - name: Cleanup + file: + path: "{{ item.dest }}" + state: absent + loop: "{{ __varfiles_created.results }}" + delegate_to: localhost + when: inventory_hostname == ansible_play_hosts_all[0]