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

refactor: Use vars/RedHat_N.yml symlink for CentOS, Rocky, Alma wherever possible #422

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 17 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,20 @@ __logging_required_facts:
# the 'gather_subset' parameter of the 'setup' module
__logging_required_facts_subsets: "{{ ['!all', '!min'] +
__logging_required_facts }}"

# BEGIN redhat distros variables
# Ansible distribution identifiers that the role treats like RHEL
__logging_rh_distros:
- AlmaLinux
- CentOS
- RedHat
- Rocky

# Same as above but includes Fedora
__logging_rh_distros_fedora: "{{ __logging_rh_distros + ['Fedora'] }}"
# Use this in conditionals to check if distro is Red Hat or clone
__logging_is_rh_distro: "{{ ansible_distribution in __logging_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__logging_is_rh_distro_fedora: "{{ ansible_distribution in __logging_rh_distros_fedora }}"
# END redhat distros variables
1 change: 1 addition & 0 deletions roles/rsyslog/vars/AlmaLinux_7.yml
1 change: 1 addition & 0 deletions roles/rsyslog/vars/Rocky_7.yml
15 changes: 15 additions & 0 deletions tests/vars/redhat_clone_vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# vars for handling conditionals for RedHat and clones
---
# Ansible distribution identifiers that the role treats like RHEL
__logging_rh_distros:
- AlmaLinux
- CentOS
- RedHat
- Rocky

# Same as above but includes Fedora
__logging_rh_distros_fedora: "{{ __logging_rh_distros + ['Fedora'] }}"
# Use this in conditionals to check if distro is Red Hat or clone
__logging_is_rh_distro: "{{ ansible_distribution in __logging_rh_distros }}"
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__logging_is_rh_distro_fedora: "{{ ansible_distribution in __logging_rh_distros_fedora }}"
Loading