Upstream mkfs.gfs2 has a new -U option for specifying the UUID, which will be useful in the gfs2 Ansible role. mkfs.gfs2 is also one of only a few mkfses that doesn't have a UUID option, so this will give it a more complete feature set. There should only be one small upstream patch to backport: https://pagure.io/gfs2-utils/c/822f230e3f60a9643c6bb4d90c48c57207ba371c.patch
Testing notes: The test suite that runs at package build time contains some basic validation tests: https://pagure.io/gfs2-utils/blob/RHEL8/f/tests/mkfs.at#_178-182 Beyond that, some additional tests could be: uuid=$(uuidgen) mkfs.gfs2 -U $uuid ... $device mount $device $mountpoint grep -Hi $uuid /sys/fs/gfs2/$(basename $(readlink -f $device))`/uuid umount $device tunegfs2 -l $device | grep $uuid
Verified with some manual testing with gfs2-utils-3.2.0-13.el8.x86_64