Skip to content

Instantly share code, notes, and snippets.

@ariestiyansyah
Created February 22, 2016 04:48
Show Gist options
  • Save ariestiyansyah/5cd18a75c303ff5f03ee to your computer and use it in GitHub Desktop.
Save ariestiyansyah/5cd18a75c303ff5f03ee to your computer and use it in GitHub Desktop.
Create EC2 Instances using ansible
--- # EC2 MODULE PROVISIONING
- hosts: localhost
connection: local
remote_user: test
become: yes
gather_facts: no
vars_files:
- files/awscreds.yml
tasks:
- name: Basic Provisioning of two m3.medium EC2 instance
ec2:
aws_access_key: "{{ aws_id }}"
aws_secret_key: "{{ aws_key }}"
region: "{{ aws_region }}"
image: ami-f0091d91
instance_type: m3.medium
count: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment