HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Install apache on awa ec2 from locally installed ansible server on my laptop

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
laptopansibleinstallec2awalocallyserverfrominstalledapache

Problem

I would like to install apache2 remotely on aws ec2 instance from my locally installed ansible server on my laptop. I have also the. pem key of the instance. Now what Ip need to put in /etc/ansible/hosts file inorder to connect ec2 instance from my laptop?

Solution

You need to put public ip address or hostname assigned by aws ec2 service, if your aws ec2 instance is public.

If your aws ec2 instance is located in vpc, you won't be able to connect it directly. Either you need to setup routing through internet gateway or you have to setup ansible server in vpc.

Context

StackExchange DevOps Q#11422, answer score: 1

Revisions (0)

No revisions yet.