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

tests: simplify distro check in tests_environments.yml #204

Merged

Conversation

ptoscano
Copy link
Collaborator

Simplify a distro check in tests_environments.yml to ease potentially adding more EL distros:

  • because of the short-circuiting of expressions, all the "or" conditions are run currently only on "CentOS" and "RedHat"
  • since CentOS Stream is the only "unversioned" EL distro, move its condition as the first after the distro check
  • drop the name check, leaving only the version check, in any other case (i.e. currently on "RedHat")

This makes is possible to support more EL distros in this check, and in case they are versioned all it is needed is to tweak the first condition (i.e. the check for ansible_distribution not in ...).

There is no behaviour change.

Simplify a distro check in tests_environments.yml to ease potentially
adding more EL distros:
- because of the short-circuiting of expressions, all the "or"
  conditions are run currently only on "CentOS" and "RedHat"
- since CentOS Stream is the only "unversioned" EL distro, move its
  condition as the first after the distro check
- drop the name check, leaving only the version check, in any other case
  (i.e. currently on "RedHat")

This makes is possible to support more EL distros in this check, and in
case they are versioned all it is needed is to tweak the first
condition (i.e. the check for "ansible_distribution not in ...").

There is no behaviour change.

Signed-off-by: Pino Toscano <[email protected]>
@ptoscano ptoscano requested a review from richm as a code owner October 21, 2024 06:43
@ptoscano
Copy link
Collaborator Author

[citest]

@ptoscano
Copy link
Collaborator Author

[citest bad]

@ptoscano ptoscano merged commit ee5e4f8 into linux-system-roles:main Oct 22, 2024
14 of 15 checks passed
@ptoscano ptoscano deleted the tests-environments-distro-check branch October 22, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants