diff --git a/defaults/main.yml b/defaults/main.yml index daf0cf4f..4608e773 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 - DO NOT EDIT THIS BLOCK - rh 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 - DO NOT EDIT THIS BLOCK - rh distros variables diff --git a/roles/rsyslog/vars/AlmaLinux_7.yml b/roles/rsyslog/vars/AlmaLinux_7.yml new file mode 120000 index 00000000..105e6302 --- /dev/null +++ b/roles/rsyslog/vars/AlmaLinux_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/roles/rsyslog/vars/Rocky_7.yml b/roles/rsyslog/vars/Rocky_7.yml new file mode 120000 index 00000000..105e6302 --- /dev/null +++ b/roles/rsyslog/vars/Rocky_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/tests/vars/rh_distros_vars.yml b/tests/vars/rh_distros_vars.yml new file mode 100644 index 00000000..92ab1a63 --- /dev/null +++ b/tests/vars/rh_distros_vars.yml @@ -0,0 +1,16 @@ +# vars for handling conditionals for RedHat and clones +# DO NOT EDIT - file is auto-generated +--- +# 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 }}"