Skip to main content

Ansible

This page provides introduction to Ansible.

Overview

Ansible is an open-source automation tool designed to simplify the management of IT infrastructure. It uses a declarative language based on YAML to define tasks such as configuration management, application deployment, and orchestration. Ansible operates in an agentless manner, meaning it doesn't require software agents on the target machines, leveraging SSH for communication.

Installing Ansible

To install ansible on MAC os run below commands:

brew install ansible

You can also use pip in your selected Python environment to install the full Ansible package for the current user using below command:

python3 -m pip install --user ansible

Secure Shell (SSH)

SSH (Secure Shell) is a cryptographic network protocol used for securely accessing and managing devices over an unsecured network.

Below are the commands to create an SSH key and set up SSH access from the Ansible controller host:

  • Generate SSH key on your Ansible controller host.
ssh-keygen
  • Copy SSH key from Ansible controller host to inventory node.
ssh-copy-id -i ~/.ssh/id_rsa.pub <inventory_node_ip_address>
  • Connect to inventory node.
ssh <inventory_node_ip_address>

Ansible Demo Project

Click here to view repository.

Let's start by setting up a Python project with Pulumi and GitHub Actions integration. Please follow the instructions provided in the links below for each setup.

Now let's add Github action for ansible setup.