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

test: Add python_version to test facts gather ansible_python_version #148

Merged
merged 1 commit into from
Feb 14, 2024
Merged
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
15 changes: 15 additions & 0 deletions tests/tests_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: Test cockpit_* role options
hosts: all
gather_facts: false
roles:
- role: linux-system-roles.cockpit
vars:
Expand All @@ -19,6 +20,20 @@
tasks:
- name: Tests
block:
# For now, keeping this task in-place. Can be moved to a separate task
# file in case this is needed in other tests.
# Without this task, the test fails on Ansible-2.14 on RHEL 8.10
- name: Ensure ansible_facts used by this test
vars:
__cockpit_test_facts:
- python_version
__cockpit_test_facts_subsets: "{{ ['!all', '!min'] +
__cockpit_test_facts }}"
setup:
gather_subset: "{{ __cockpit_test_facts_subsets }}"
when: __cockpit_test_facts |
difference(ansible_facts.keys() | list) | length > 0

- name: Flush handlers
meta: flush_handlers

Expand Down
Loading