diff --git a/tests/vars/redhat_clone_vars.yml b/tests/vars/redhat_clone_vars.yml new file mode 100644 index 00000000..8a6e8692 --- /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 +__podman_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__podman_rh_distros_fedora: "{{ __podman_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__podman_is_rh_distro: "{{ ansible_distribution in __podman_rh_distros }}" +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__podman_is_rh_distro_fedora: "{{ ansible_distribution in __podman_rh_distros_fedora }}" diff --git a/vars/AlmaLinux_10.yml b/vars/AlmaLinux_10.yml new file mode 120000 index 00000000..f830d5f9 --- /dev/null +++ b/vars/AlmaLinux_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/AlmaLinux_8.yml b/vars/AlmaLinux_8.yml new file mode 120000 index 00000000..ad7713d6 --- /dev/null +++ b/vars/AlmaLinux_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml deleted file mode 100644 index 83589d5b..00000000 --- a/vars/CentOS_10.yml +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT ---- -# shadow-utils-subid for getsubids -__podman_packages: - - iptables-nft - - podman - - shadow-utils-subid diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml new file mode 120000 index 00000000..f830d5f9 --- /dev/null +++ b/vars/CentOS_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml deleted file mode 100644 index 3b4cc11b..00000000 --- a/vars/CentOS_8.yml +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: MIT ---- -__podman_packages: - - crun - - podman - - podman-plugins - - shadow-utils-subid diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml new file mode 120000 index 00000000..ad7713d6 --- /dev/null +++ b/vars/CentOS_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/Rocky_10.yml b/vars/Rocky_10.yml new file mode 120000 index 00000000..f830d5f9 --- /dev/null +++ b/vars/Rocky_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/Rocky_8.yml b/vars/Rocky_8.yml new file mode 120000 index 00000000..ad7713d6 --- /dev/null +++ b/vars/Rocky_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml index bdc1135b..0beb6ebf 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -82,3 +82,20 @@ __podman_user_certs_d_path: "/.config/containers/certs.d" # location for system certs_d __podman_system_certs_d_path: "/etc/containers/certs.d" + +# BEGIN redhat distros variables +# Ansible distribution identifiers that the role treats like RHEL +__podman_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__podman_rh_distros_fedora: "{{ __podman_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__podman_is_rh_distro: "{{ ansible_distribution in __podman_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__podman_is_rh_distro_fedora: "{{ ansible_distribution in __podman_rh_distros_fedora }}" +# END redhat distros variables