diff --git a/tests/vars/rh_distros_vars.yml b/tests/vars/rh_distros_vars.yml new file mode 100644 index 0000000..73564e0 --- /dev/null +++ b/tests/vars/rh_distros_vars.yml @@ -0,0 +1,18 @@ +# vars for handling conditionals for RedHat and clones +# DO NOT EDIT - file is auto-generated +--- +# Ansible distribution identifiers that the role treats like RHEL +__kernel_settings_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__kernel_settings_rh_distros_fedora: "{{ __kernel_settings_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__kernel_settings_is_rh_distro: "{{ ansible_distribution in __kernel_settings_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__kernel_settings_is_rh_distro_fedora: "{{ ansible_distribution in __kernel_settings_rh_distros_fedora }}" diff --git a/vars/AlmaLinux_7.yml b/vars/AlmaLinux_7.yml new file mode 120000 index 0000000..105e630 --- /dev/null +++ b/vars/AlmaLinux_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/CentOS_7.yml b/vars/CentOS_7.yml deleted file mode 100644 index f4e88b8..0000000 --- a/vars/CentOS_7.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -__kernel_settings_packages: ["tuned", "python-configobj"] -__kernel_settings_services: ["tuned"] diff --git a/vars/CentOS_7.yml b/vars/CentOS_7.yml new file mode 120000 index 0000000..105e630 --- /dev/null +++ b/vars/CentOS_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/Rocky_7.yml b/vars/Rocky_7.yml new file mode 120000 index 0000000..105e630 --- /dev/null +++ b/vars/Rocky_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml index 818e71d..0c9a53a 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -31,3 +31,21 @@ __kernel_settings_required_facts: # the 'gather_subset' parameter of the 'setup' module __kernel_settings_required_facts_subsets: "{{ ['!all', '!min'] + __kernel_settings_required_facts }}" + +# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables +# Ansible distribution identifiers that the role treats like RHEL +__kernel_settings_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__kernel_settings_rh_distros_fedora: "{{ __kernel_settings_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__kernel_settings_is_rh_distro: "{{ ansible_distribution in __kernel_settings_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__kernel_settings_is_rh_distro_fedora: "{{ ansible_distribution in __kernel_settings_rh_distros_fedora }}" +# END - DO NOT EDIT THIS BLOCK - rh distros variables