Ansible is one of the popular configuration management tools. Ansible
can also be used for infrastructure provisioning as well in AWS. Please
find steps for installing Ansible on Apple Mac OS or laptop.
Ansible can be installed on Mac OS many ways, but preferred way is using pip which is a Python package manager.
Install Pip
If pip isn’t already available on your system, run the following commands to install it:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip --version
Once pip is installed, install Ansible using pip.
Once pip is installed, install Ansible using pip.
Install Ansible using Pip
To install ansible globally, use following commandsudo -H pip3 install ansible
Once Ansible is installed, you can verify the version.
ansible --version
You should be able to see the version.
ansible --version
You should be able to see the version.
Install Boto framework
Boto is a Python package that provides interfaces to Amazon Web Service. It is AWS SDK for Python.
sudo pip install boto
sudo pip install boto3
sudo pip install boto3
Create Ansible hosts file
when you install Ansible on Mac OS, it does not create ansible hosts file. so you need to create it.
sudo mkdir /etc/ansible
Watch the above steps as a video in YouTube channel:
Hi, every time I download the file for ansible it gives me an error:
ReplyDeleteERROR: Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
Use the below command
Deletepython3 -m pip install ansible
This worked for me and installed ansible 2.10.3 on my Macbook pro 2019
I also got an error.
ReplyDeleteERROR: Could not find a version that satisfies the requirement ansible (from versions): none)
ERROR:No matching distribution found for ansible
Where will be the ansible.cfg and how we can run Roles from mac
ReplyDelete