Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: support ansible-lint and ansible-test 2.16 #133

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Default state for all rules
default: true

Expand Down
15 changes: 12 additions & 3 deletions tests/tests_include_vars_from_parent.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Test role variable override
- name: Test role include variable override
hosts: all
gather_facts: true
tasks:
Expand All @@ -13,7 +13,7 @@
# XXX ugly, self-modifying code - changes the "caller" role on
# the controller
dest: "{{ playbook_dir }}/roles/caller/vars/{{ item }}.yml"
mode: 0600
mode: preserve
loop: "{{ varfiles | unique }}"
# In case the playbook is executed against multiple hosts, use
# only the first one. Otherwise the hosts would stomp on each
Expand All @@ -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: Call caller role
- name: Import role
import_role:
name: caller
vars:
roletoinclude: linux-system-roles.ssh

- name: Cleanup
file:
path: "{{ item.dest }}"
state: absent
loop: "{{ __varfiles_created.results }}"
delegate_to: localhost
when: inventory_hostname == ansible_play_hosts_all[0]
Loading