Install pipx with ansible:

brew install pipx

To prevent the following error: (mainly in redhat 8)

SyntaxError: future feature annotations is not defined

Install ansible < 2.17:

pipx install ansible-core==2.16.8

Add passlib:

pipx inject ansible-core passlib