diff --git a/tests/vars/redhat_clone_vars.yml b/tests/vars/redhat_clone_vars.yml new file mode 100644 index 00000000..c251f85d --- /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 +__storage_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__storage_rh_distros_fedora: "{{ __storage_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__storage_is_rh_distro: "{{ ansible_distribution in __storage_rh_distros }}" +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__storage_is_rh_distro_fedora: "{{ ansible_distribution in __storage_rh_distros_fedora }}" diff --git a/vars/AlmaLinux_10.yml b/vars/AlmaLinux_10.yml deleted file mode 100644 index d7eb3f3e..00000000 --- a/vars/AlmaLinux_10.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-fs - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" -# vdo not yet available on el10 -# - vdo 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_7.yml b/vars/AlmaLinux_7.yml new file mode 120000 index 00000000..105e6302 --- /dev/null +++ b/vars/AlmaLinux_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/AlmaLinux_8.yml b/vars/AlmaLinux_8.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/AlmaLinux_8.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" 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/AlmaLinux_9.yml b/vars/AlmaLinux_9.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/AlmaLinux_9.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" diff --git a/vars/AlmaLinux_9.yml b/vars/AlmaLinux_9.yml new file mode 120000 index 00000000..0eb3795d --- /dev/null +++ b/vars/AlmaLinux_9.yml @@ -0,0 +1 @@ +RedHat_9.yml \ No newline at end of file diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml deleted file mode 100644 index d7eb3f3e..00000000 --- a/vars/CentOS_10.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-fs - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" -# vdo not yet available on el10 -# - vdo 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_7.yml b/vars/CentOS_7.yml deleted file mode 100644 index 8f54e49e..00000000 --- a/vars/CentOS_7.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -blivet_package_list: - - python-enum34 - - python-blivet3 - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" -# additional options for mkfs when creating a disk volume (whole disk fs) -__storage_blivet_diskvolume_mkfs_option_map: - ext2: '-F' - ext3: '-F' - ext4: '-F' diff --git a/vars/CentOS_7.yml b/vars/CentOS_7.yml new file mode 120000 index 00000000..105e6302 --- /dev/null +++ b/vars/CentOS_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/CentOS_8.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" 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/CentOS_9.yml b/vars/CentOS_9.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/CentOS_9.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" diff --git a/vars/CentOS_9.yml b/vars/CentOS_9.yml new file mode 120000 index 00000000..0eb3795d --- /dev/null +++ b/vars/CentOS_9.yml @@ -0,0 +1 @@ +RedHat_9.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_7.yml b/vars/Rocky_7.yml new file mode 120000 index 00000000..105e6302 --- /dev/null +++ b/vars/Rocky_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/Rocky_8.yml b/vars/Rocky_8.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/Rocky_8.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" 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/Rocky_9.yml b/vars/Rocky_9.yml deleted file mode 100644 index c635708c..00000000 --- a/vars/Rocky_9.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -blivet_package_list: - - python3-blivet - - libblockdev-crypto - - libblockdev-dm - - libblockdev-lvm - - libblockdev-mdraid - - libblockdev-swap - - vdo - - kmod-kvdo - - xfsprogs - - stratisd - - stratis-cli - # XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere - # else, it is already brought in as dependency of blivet so it's just no-op here - - "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}" diff --git a/vars/Rocky_9.yml b/vars/Rocky_9.yml new file mode 120000 index 00000000..0eb3795d --- /dev/null +++ b/vars/Rocky_9.yml @@ -0,0 +1 @@ +RedHat_9.yml \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml index b09a049d..f5697cfb 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -12,3 +12,20 @@ __storage_required_facts: # the 'gather_subset' parameter of the 'setup' module __storage_required_facts_subsets: "{{ ['!all', '!min'] + __storage_required_facts }}" + +# BEGIN redhat distros variables +# Ansible distribution identifiers that the role treats like RHEL +__storage_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__storage_rh_distros_fedora: "{{ __storage_rh_distros + ['Fedora'] }}" +# Use this in conditionals to check if distro is Red Hat or clone +__storage_is_rh_distro: "{{ ansible_distribution in __storage_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__storage_is_rh_distro_fedora: "{{ ansible_distribution in __storage_rh_distros_fedora }}" +# END redhat distros variables