---
title: "Discussion on \"How to install ansible and run your first ansible Ad-Hoc Command.\" | Hashnode"
description: "Discussion on \"How to install ansible and run your first ansible Ad-Hoc Command.\". Prerequisites: Create two EC2 instances one as main and second as target instance.\n1. Install Ansible on main instance:\nBash\n\n  sudo apt update\n  sudo apt install ansible\n\n\nVerify Installation:\n\n\nBash\nansible --version\n\n2. Set Up Passwordless Authent..."
url: "https://hashnode.com/posts/how-to-install-ansible-and-run-your-first-ansible-ad-hoc-command/675211d8cc1125be2780e71b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to install ansible and run your first ansible Ad-Hoc Command.](https://bugslayer.hashnode.dev/how-to-install-ansible-and-run-your-first-ansible-ad-hoc-command?utm_source=hashnode&utm_medium=feed)

Prerequisites: Create two EC2 instances one as main and second as target instance. 1. Install Ansible on main instance: Bash sudo apt update sudo apt install ansible Verify Installation: Bash ansible --version 2. Set Up Passwordless Authent...

Dec 5, 2024 · 2 min read · bugslayer.hashnode.dev  
Read the article

-   [#ansible](https://hashnode.com/tag/ansible)
-   [#devops](https://hashnode.com/tag/devops)
-   [#aws](https://hashnode.com/tag/aws)
-   [#cloud](https://hashnode.com/tag/cloud)
-   [#cloud-computing](https://hashnode.com/tag/cloud-computing)

## Written by

[Kartik](https://hashnode.com/@kartikp)

@kartikp

  
[View profile](https://hashnode.com/@kartikp)

Bugslayer in training

Learner, reader, writer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
