You can install Ansible quickly in your system with Homebrew( or PIP(Package manager for Python)
Install Ansible with Homebrew
If you are using macOS, then you can use Homebrew.
First, ensure that you have Homebrew installed in your system. Homebrew is a package manager for Mac OS.
$ brew update $ brew install ansible
Checking Ansible version
$ ansible --version ansible 2.9.7 config file = None configured module search path = ['/Users/kenanhancer/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /Users/kenanhancer/.pyenv/versions/3.8.2/lib/python3.8/site-packages/ansible executable location = /Users/kenanhancer/.pyenv/versions/3.8.2/bin/ansible python version = 3.8.2 (default, May 6 2020, 12:47:50) [Clang 11.0.3 (clang-118.104.22.168)]
Install Ansible with PIP
Ensure that you have Python and PIP in your system. Check the following page about Python installation.
$ pip install ansible
$ ansible --version
$ pip install --upgrade ansible
Installing specific Ansible version
$ pip install ansible==22.214.171.124
$ pip install ansible==126.96.36.199