in my comprehension, ansible controller push some python code onto the target and this code is executed on the target.
does that mean that a 3.8 target recognize 2.7 code (we all know there is a compatibility rupture between 2.7 and 3.X) and can execute 2.7 code without problem?
the code pushed is from modules and module_utils, which are coded to
be compatible with the widest range of python versions.
You could also write modules in other languages (and people have in
perl/ruby/bash/golang/etc) and use ansible to execute them, the code
on the controller really does not have to match with the code
executing on remotes.