Ansible cheat sheet

SSH Key Generation
Setting Up SSH.
command: sudo apt-get install openssh-server

Generating SSH Key
command: ssh-keygen

Copy the SSH Key on the Hosts
command:ssh-copy-id hostname

Check the SSH Connection
command: ssh

Install Ansible
Install Ansible on Debian based Linux
Add Ansible repository
command: sudo apt-add-repository ppa:ansible/ansible

Run the update command
command: sudo apt-get update

Install Ansible package
command: sudo apt-get install ansible -y

Check Ansible Version
command: ansible --version

Inventory Files & Hosts Patterns
The inventory file of Ansible lists all the platforms you want to automate across. Ansible at a single instance can work on multiple hosts in the infrastructure. It is also possible to have multiple inventory files at the same time

Set up hosts by editing the hosts file in the Ansible directory
command: sudo nano /etc/ansible/hosts




Relevant Blogs:

Ansible connect Linux node 

Introduction to YAML 

Types of Nodes in Openstack

OWASP Installation and Configuration


Recent Comments

No comments

Leave a Comment