Skip to content

Commit

Permalink
test: do not enable repos on RedHat systems
Browse files Browse the repository at this point in the history
assume RedHat test systems have the correct repos already
enabled

set min_ansible_version to 2.9

Signed-off-by: Rich Megginson <[email protected]>
  • Loading branch information
richm committed Apr 25, 2024
1 parent 83f41d1 commit 5f374fe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
description: Configure and manage gfs2 file systems in a pacemaker cluster.
company: Red Hat, Inc.
license: MIT
min_ansible_version: "2.12"
min_ansible_version: "2.9"
platforms:
- name: Fedora
versions:
Expand Down
2 changes: 0 additions & 2 deletions tasks/fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,13 @@
changed_when: false
failed_when: not lv_path.stat.exists
any_errors_fatal: true
become: true

- name: Create mount point
ansible.builtin.file:
path: "{{ fs.mount_point }}"
state: directory
mode: "0755"
any_errors_fatal: true
become: true

- name: Check whether the gfs2 file system resource exists
ansible.builtin.command:
Expand Down
4 changes: 3 additions & 1 deletion tests/tests_basic_gfs2_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
---
- name: Basic usability test
hosts: all
become: true
# argument validation requires facts
gather_facts: true
vars:
common_cluster_name: testcluster
mount_point: /mnt/test
gfs2_enable_repos: "{{ ansible_facts['distribution'] != 'RedHat' }}"
tasks:
- name: Skip this test if test system does not support
meta: end_host
Expand Down
4 changes: 3 additions & 1 deletion tests/tests_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
---
- name: Basic usability test
hosts: all
gather_facts: false
# argument validation requires facts
gather_facts: true
vars:
gfs2_cluster_name: gfs2_test_cluster
gfs2_file_systems: []
_gfs2_test_allow_stonith_disabled: true
gfs2_enable_repos: "{{ ansible_facts['distribution'] != 'RedHat' }}"
roles:
- linux-system-roles.gfs2

0 comments on commit 5f374fe

Please sign in to comment.