- Download and install Miniconda:
curl -OL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh
- You will be prompted several times during the installation process. Review the terms and conditions and select “yes” for each prompt.
- Restart your shell session for the changes to your PATH to take effect.
exec bash -l
- Create a new virtual environment for Ansible:
conda create -n ansible-dev python=3
- Activate the new environment:
conda activate ansible-dev
- Check your Python version:
sudo apt update sudo apt install software-properties-common sudo apt-add-repository --yes --update ppa:ansible/ansible sudo apt install ansible
- Verify that Ansible is installed:
By default, Ansible’s configuration file location is /etc/ansible/ansible.cfg. In most cases, the default configurations are enough to get you started using Ansible. In this example, you will use Ansible’s default configurations.
- To view a list of all current configs available to your control node, use the ansible-config command line utility.
Create an Ansible Inventory
Ansible keeps track of its managed nodes using an inventory file located in
/etc/ansible/hosts. In the inventory file, you can group your managed nodes and use these groups to target specific hosts that make up your infrastructure