Ansible Automation | Automating AWS EC2 Instance Creation using Ansible

preview_player
Показать описание
In this video, steps explained to perform the following tasks using Ansible Playbook

1) Create security group
2) Create EC2 instance
Рекомендации по теме
Комментарии
Автор

Excellent Videos Yogesh Mehta, Your explanation is really very much good.

saiprasad
Автор

Nice tutorial, esay to undersand, Thank you

meenugupta
Автор

Great video, Yogesh.

Question ... is your 'awsmgmt' server that you're showing in video, is this a VM in the AWS cloud or is this a local laptop/desktop outside of AWS?

I keep getting errors and was curious. I have python 2.7.5 and boto3 installed:
[WARNING]: Could not match supplied host pattern, ignoring: all

[WARNING]: provided hosts list is empty, only localhost is available


PLAY [localhost]

TASK [Gathering Facts]
ok: [localhost]

TASK [Provision a EC2 Instance]
fatal: [localhost]: FAILED! => {"changed": false, "msg": "boto required for this module"}

Thanks for the help!!

commusaftraining
Автор

Good video Yogesh. I have one question ..where you are running this play book ...i.e. on aws console ??

shivakumarmarkelkar
Автор

great videos.. yogesh. a piece of advise .. plz upload the playbook/code/any files that u want to share i github and share the link here.

VijayNarravula
Автор

Hi Yogesh

After spinning up the new ec2 instance, how do I ssh into the newly launched server and perform tasks on it using ansible.

Thank you in advance
Shubhankar Jagdish

shubhankarbanthala
Автор

Hi Yogesh

How to make the connection between ansble and EC2 console
i mean how it will understand the instance should create in this account

subhajitadhya
Автор

Hi Yougesh,

I would like to add multiple security group to single instance, how to define in this code and use custom private IP? Also, we would like to rename the instance and join into domain, in case in Windows EC2?, is this possible? We usually creates multiple windows ec2 and changing the name manually and adding them into domain, it painful task. Please help.

coolboy
Автор

Hi Yogesh
How do I terminate the instance. I added the below script at the end but its errors out.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: request must contain the parameter


- name: Terminate instances that were previously launched
ec2:
state: absent
region: "{{ region }}"
instance_ids: "{{ ec2.instance_ids }}"

pavanchelvaraj
Автор

with the playbook i am able to create ec2 instance but i am not able to ssh into it please let me know how to

asitmishra
Автор

hello yogesh .. it would be helpful if you upload that playbook in in description.
appreciated

Автор

it is usefeul But if u can share related to automation that will be more useful

manimani-ghox
Автор

hello i am facing the below error . ami-id is exist it is rhel7 64 bit.
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Instance creation failed => InvalidAMIID.NotFound: The image id '[ami-cfdafaaa]' does not exist"}
ansible version: 2.3.0

shadowgallery
Автор

Hi Yogesh,

I have a scenario, where i need to share key of EC2 instances with our Dev and QA team to do activity on server.
Is it possible to create a separate user and share it with other team [Dev & QA]. Also i don't want to share the existing key of EC2 machine.
I search a lot and not getting any clue, It will be good if can make a video and share over your channel.
waiting for your reply.

RoshanSingh-kcos
Автор

Hi where is your git repo to grab the playbook? Thanks

peekmuch
Автор

is the awsmgmt host is also an EC2 instance ?

mr.asimasim
Автор

what is the necessity of wait:yes under ec2 module?

Afiffing
Автор

can u just explain me about how to use roles from ansible galaxy, and to customize th roles

manimani-ghox
Автор

are you teaching Ansible in basic and advance lavel...?

arvindjha
Автор

wher did you configured public DNS name? ...video link please
and i sen you aws cli video you just saved key into #.aws/config where you did yogesh_AWS key

sivanagireddy