Now it works correctly. Thanks for fixing the issue!
$ ansible-galaxy install painless.software
Starting galaxy role install process
- downloading role 'software', owned by painless
- downloading role from https://github.com/painless-software/ansible-role-software/archive/main.tar.gz
- extracting painless.software to /home/peter/.ansible/roles/painless.software
- painless.software (main) was installed successfully