diff --git a/meta/main.yml b/meta/main.yml index 201bfdf..33a29da 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,6 +14,7 @@ galaxy_info: versions: - all galaxy_tags: + - el - el8 - el9 - el10 diff --git a/tests/vars/redhat_clone_vars.yml b/tests/vars/redhat_clone_vars.yml new file mode 100644 index 0000000..54c0978 --- /dev/null +++ b/tests/vars/redhat_clone_vars.yml @@ -0,0 +1,15 @@ +# vars for handling conditionals for RedHat and clones +--- +# Ansible distribution identifiers that the role treats like RHEL +__sudo_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__sudo_rh_distros_fedora: "{{ __sudo_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__sudo_is_rh_distro: "{{ ansible_distribution in __sudo_rh_distros }}" +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__sudo_is_rh_distro_fedora: "{{ ansible_distribution in __sudo_rh_distros_fedora }}" diff --git a/vars/main.yml b/vars/main.yml index 939a517..c8e60b2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -10,3 +10,20 @@ __sudo_required_facts: - os_family __sudo_required_facts_subsets: "{{ ['!all', '!min'] + __sudo_required_facts }}" + +# BEGIN redhat distros variables +# Ansible distribution identifiers that the role treats like RHEL +__sudo_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__sudo_rh_distros_fedora: "{{ __sudo_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__sudo_is_rh_distro: "{{ ansible_distribution in __sudo_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__sudo_is_rh_distro_fedora: "{{ ansible_distribution in __sudo_rh_distros_fedora }}" +# END redhat distros variables