Alpine Linux, Busybox, ArchLinux are examples.
If python happens to disappear from all linux distros ansible can still work with the raw module.
In any case, the bash script posted is based on apt install so it's not going to work on much less amount of distros rather than if it was just an ansible role.