Override platform/distribution for module subclass selection?

I’m running Ansible against a remote TinyCoreLinux host (running inside QEMU but I think that doesn’t matter). When I try to use ansible.builtin.group, it selects the wrong module subclass. I believe this is because platform.system() == ‘Linux’, /etc/os-release.ID == ‘TinyCore’, and TinyCore is not supported by module_utils.

I’ve tried overriding various hostvars but an inspection of get_platform_subclass() tells me that there is no hook for overriding distro.id() when there is a value in /etc/os-release.

The actual goal is to trigger the BusyBox subclass because that’s what TCL uses. I don’t think it makes sense for me to submit a new distribution for support.

Before I muck with /etc/os-release to trick Ansible into thinking it’s running on Alpine, is there any cleaner way to do this?

Thank you!

– Salvatore
smile.

Hmm. Can you show us the rest of your /etc/os-release?
Also, which sub-class is it selecting?

NAME=TinyCore
VERSION=“15.0”
ID=tinycore
VERSION_ID=15.0
PRETTY_NAME=“TinyCoreLinux 15.0”
ANSI_COLOR=“0;34”
CPE_NAME=“cpe:/o:tinycore:tinycore_linux:15.0”
HOME_URL=“http://tinycorelinux.net/
SUPPORT_URL=“http://forum.tinycorelinux.net/
BUG_REPORT_URL=“http://forum.tinycorelinux.net/

I’m not sure how to identify the subclass but from code inspection I believe it is the generic Linux one. I can try to hand-modify the module code but I probably can’t do that tonight.