How to write ansible playbook to setup ubuntu workstation and install any updates on it

0 votes
Nov 19, 2020 in Ansible by Shashi
• 370 points
1,251 views
Hi@Shashi,

Are you trying to provision the Ubuntu system with an Ansible playbook? Share more information about your requirement. Where you want to provision your Ubuntu workstation?
Yes I want to provision ubuntu system with ansible in AWS i.e using ec2 instance.

1 answer to this question.

0 votes

Hi@Shashi,

Ansible has one module named ec2. This is a module that is used to connect AWS using the Ansible-Playbook. I have attached one playbook below for your reference.

- hosts: localhost
  tasks:
  - name: AWS OS provisioning
    ec2:
      key_name: keymlops
      instance_type: t2.micro
      image: <Replace with Ubuntu AMI>
      wait: yes
      region: ap-south-1
      group_id: sg-01a7d863
      count: 1
      vpc_subnet_id: subnet-51167d1d
      assign_public_ip: yes
      aws_access_key:
      aws_secret_key: 
answered Nov 19, 2020 by MD
• 95,460 points

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

Playbook to install and start nginx on ubuntu

Write your playbook like this: --- - hosts: droplets ...READ MORE

answered Mar 15, 2019 in Ansible by Deep
11,922 views
0 votes
1 answer

Requirements to install MySQL and MariaDB on ubuntu - Ansible

You don't really need anything specific. Just ...READ MORE

answered Oct 24, 2019 in Ansible by Bob
668 views
0 votes
1 answer

How to write ansible playbook for storage health checking? Any references?

Why ansible in particular? You can use ...READ MORE

answered Oct 29, 2020 in Ansible by Lohith
1,710 views
0 votes
1 answer
0 votes
1 answer

How do I install Ansible on Ubuntu?

Hey Kiara, Execute the following commands to Install ...READ MORE

answered Feb 20, 2019 in Ansible by Kunal
810 views
0 votes
1 answer

How to create a key pair on AWS using Ansible-Playbook?

Hi@akhtar, You can find the ec2_key module in ...READ MORE

answered Aug 12, 2020 in Ansible by MD
• 95,460 points
1,444 views
0 votes
1 answer

Is it possible to start ec2 Windows machine and run windows command using ansible playbook?

Hi@Lakshminarayanan, Yes, you can do that. But after ...READ MORE

answered Aug 14, 2020 in Ansible by MD
• 95,460 points
2,669 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP