-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AWS provisioning playbook and account creation manual (#502)
* AWS create account and instances * updated readme and playbook * update readme
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Description | ||
|
||
Here you can read a manual on AWS account creation: [AWS manual](https://docs.google.com/document/d/e/2PACX-1vTeCirL7ANTcX9vKXniKTjKkxGEE9Ftd1xBc0bHKPoSrd2aj5fNeresltDUEp6ZYNgM3EZF5csNj_R4/pub) | ||
|
||
This playbook creates one Linux and one Windows EC2 instances from customized AMIs so whole setup fits into Free Tier limits. This means it can run for free 1 year from AWS account creation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
- name: Prepare AWS account and create instances | ||
hosts: localhost | ||
gather_facts: false | ||
|
||
tasks: | ||
- name: "Add SSH key" | ||
tags: | ||
- aws | ||
amazon.aws.ec2_key: | ||
name: AWS | ||
key_material: "{{ lookup('file', 'AWS.pub') }}" | ||
|
||
- name: "Create SG with allowed management traffic" | ||
tags: | ||
- aws | ||
amazon.aws.ec2_group: | ||
name: ddos | ||
description: Allows management traffic | ||
rules: | ||
- rule_desc: SSH | ||
cidr_ip: 0.0.0.0/0 | ||
proto: tcp | ||
from_port: 22 | ||
to_port: 22 | ||
- rule_desc: RDP | ||
cidr_ip: 0.0.0.0/0 | ||
proto: tcp | ||
from_port: 3389 | ||
to_port: 3389 | ||
|
||
- name: "Create Linux instance" | ||
tags: | ||
- linux | ||
amazon.aws.ec2_instance: | ||
name: Linux | ||
state: running | ||
instance_type: t2.micro | ||
security_group: ddos | ||
image_id: ami-0ae4d073cedc64830 | ||
key_name: "AWS" | ||
network: | ||
assign_public_ip: true | ||
|
||
- name: "Create Windows instance" | ||
tags: | ||
- windows | ||
amazon.aws.ec2_instance: | ||
name: Windows | ||
state: running | ||
instance_type: t2.micro | ||
security_group: ddos | ||
image_id: ami-050d60cac23150261 | ||
key_name: "AWS" | ||
network: | ||
assign_public_ip: true |