198 lines
5.8 KiB
YAML
198 lines
5.8 KiB
YAML
|
---
|
||
|
- name: create_ec2
|
||
|
hosts: localhost
|
||
|
gather_facts: false
|
||
|
|
||
|
tasks:
|
||
|
- name: Create EC2 instances 21
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web21
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.171"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web21
|
||
|
|
||
|
- name: Create EC2 instances 22
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web22
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.172"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web22
|
||
|
|
||
|
- name: Create EC2 instances 23
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web23
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.173"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web23
|
||
|
|
||
|
- name: Create EC2 instances 24
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web24
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.174"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web24
|
||
|
|
||
|
- name: Create EC2 instances 25
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web25
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.175"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web25
|
||
|
|
||
|
- name: Create EC2 instances 26
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web26
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.176"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web26
|
||
|
|
||
|
- name: Create EC2 instances 27
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web27
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.177"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web27
|
||
|
|
||
|
- name: Create EC2 instances 28
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web28
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.178"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web28
|
||
|
|
||
|
- name: Create EC2 instances 29
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web29
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.179"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web29
|
||
|
|
||
|
- name: Create EC2 instances 30
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web30
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.180"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web30
|
||
|
|
||
|
- name: Create EC2 instances 31
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web31
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.181"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web31
|
||
|
|
||
|
- name: Create EC2 instances 32
|
||
|
amazon.aws.ec2_instance:
|
||
|
name: ansible_ec2_web32
|
||
|
instance_type: t2.micro
|
||
|
image_id: ami-0525a3bbe44c34cbf
|
||
|
key_name: hands-on_ansible
|
||
|
region: ap-northeast-1
|
||
|
vpc_subnet_id: subnet-0689f38f21f538a55
|
||
|
security_group: jenkins-ec2-sg
|
||
|
network:
|
||
|
assign_public_ip: yes
|
||
|
private_ip_address: "10.1.5.182"
|
||
|
device_index: 0
|
||
|
tags:
|
||
|
Name: ansible-ec2-web32
|