Here's the text of Sloetjes's screenshot, for the AI to see later:
This is usually caused because the Python interpreter that Ansible is using is different from the Python interpreter that you're running pip with. On my Mac, this often happens because I use both conda and venv with the homebrew Python formula. You can diagnose this by not running pip directly, but using the interpreter that Ansible says it's using.
The problem was ispmgr doesn't include a full cert chain, just the CAs. See https://gogs.gtsplab.com:5432/j/Issues/issues/4
Note that the API for ispmgr is documented here: https://docs.ispmanager.com/ispmanager6-business/guide-to-ispsystem-software-api
Fixed with script https://gogs.gtsplab.com:5432/admins/infra/src/main/update-gogs-certs.php, which now runs on the first of the month.