Skip to content

Commit c96bba1

Browse files
committed
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 <[email protected]>
1 parent 2202735 commit c96bba1

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.markdownlint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# Default state for all rules
23
default: true
34

tests/tests_include_vars_from_parent.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Test role variable override
2+
- name: Test role include variable override
33
hosts: all
44
gather_facts: true
55
tasks:
@@ -13,7 +13,7 @@
1313
# XXX ugly, self-modifying code - changes the "caller" role on
1414
# the controller
1515
dest: "{{ playbook_dir }}/roles/caller/vars/{{ item }}.yml"
16-
mode: 0600
16+
mode: preserve
1717
loop: "{{ varfiles | unique }}"
1818
# In case the playbook is executed against multiple hosts, use
1919
# only the first one. Otherwise the hosts would stomp on each
@@ -38,9 +38,18 @@
3838
varfiles: "{{ [facts['distribution']] | product(separators) |
3939
map('join') | product(versions) | map('join') | list +
4040
[facts['distribution'], facts['os_family']] }}"
41+
register: __varfiles_created
4142

42-
- name: Call caller role
43+
- name: Import role
4344
import_role:
4445
name: caller
4546
vars:
4647
roletoinclude: linux-system-roles.ssh
48+
49+
- name: Cleanup
50+
file:
51+
path: "{{ item.dest }}"
52+
state: absent
53+
loop: "{{ __varfiles_created.results }}"
54+
delegate_to: localhost
55+
when: inventory_hostname == ansible_play_hosts_all[0]

0 commit comments

Comments
 (0)