commit
b2dd01a0b0
4 changed files with 7 additions and 5 deletions
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
- name: Template the inventory
|
- name: Template the inventory
|
||||||
template:
|
template:
|
||||||
src: templates/inventory.ini.j2
|
src: ../templates/inventory-aws.j2
|
||||||
dest: "{{ inventory_path }}"
|
dest: "{{ inventory_path }}"
|
||||||
|
|
||||||
- name: Wait until SSH is available
|
- name: Wait until SSH is available
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
- name: Terminate EC2 instances
|
- name: Terminate EC2 instances
|
||||||
local_action:
|
local_action:
|
||||||
module: ec2
|
module: ec2
|
||||||
|
aws_access_key: "{{ aws_access_key }}"
|
||||||
|
aws_secret_key: "{{ aws_secret_key }}"
|
||||||
state: absent
|
state: absent
|
||||||
instance_ids: "{{ ansible_ec2_instance_id }}"
|
instance_ids: "{{ ansible_ec2_instance_id }}"
|
||||||
region: "{{ ansible_ec2_placement_region }}"
|
region: "{{ ansible_ec2_placement_region }}"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
localhost ansible_connection=localx
|
localhost ansible_connection=local
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
node1 ansible_ssh_host={{ec2.instances[0].public_ip}} ansible_ssh_user=admin
|
node1 ansible_ssh_host={{ec2.instances[0].public_ip}} ansible_ssh_user={{ssh_user}}
|
||||||
node2 ansible_ssh_host={{ec2.instances[1].public_ip}} ansible_ssh_user=admin
|
node2 ansible_ssh_host={{ec2.instances[1].public_ip}} ansible_ssh_user={{ssh_user}}
|
||||||
node3 ansible_ssh_host={{ec2.instances[2].public_ip}} ansible_ssh_user=admin
|
node3 ansible_ssh_host={{ec2.instances[2].public_ip}} ansible_ssh_user={{ssh_user}}
|
||||||
|
|
||||||
[kube-master]
|
[kube-master]
|
||||||
node1
|
node1
|
Loading…
Reference in a new issue