No, Nothing is mandatory that Python is required. Ansible is written in Python, but you can write Ansible modules in any language.