Commit 5405e56d by John Jarvis

Merge pull request #121 from edx/jarv/termination-support

This adds termination support to the ec2 module
parents 7c85931f fbe3b31f
- name: Create sandbox instance - name: Create sandbox instance
hosts: localhost hosts: localhost
connection: local connection: local
user: root
sudo: False
gather_facts: False gather_facts: False
vars: vars:
keypair: continuous-integration keypair: continuous-integration
instance_type: m1.large instance_type: m1.small
security_group: sandbox security_group: sandbox
image: ami-d0f89fb9 image: ami-d0f89fb9
region: us-east-1 region: us-east-1
roles: roles:
- launch_instance - launch_instance
...@@ -24,6 +20,7 @@ ...@@ -24,6 +20,7 @@
vars_files: vars_files:
- "{{ secure_dir }}/vars/edxapp_ref_users.yml" - "{{ secure_dir }}/vars/edxapp_ref_users.yml"
- "{{ secure_dir }}/vars/edxapp_sandbox.yml" - "{{ secure_dir }}/vars/edxapp_sandbox.yml"
roles: roles:
- common - common
- nginx - nginx
......
- name: Create sandbox instance - name: Create sandbox instance
hosts: localhost hosts: localhost
connection: local connection: local
user: root
sudo: False
gather_facts: False gather_facts: False
vars: vars:
keypair: continuous-integration keypair: continuous-integration
instance_type: m1.large instance_type: m1.small
security_group: sandbox security_group: sandbox
image: ami-d0f89fb9 image: ami-d0f89fb9
region: us-east-1 region: us-east-1
roles: roles:
- launch_instance - launch_instance
...@@ -21,11 +17,24 @@ ...@@ -21,11 +17,24 @@
gather_facts: True gather_facts: True
vars: vars:
migrate_db: True migrate_db: True
ansible_ssh_private_key_file: /var/lib/jenkins/continuous-integration.pem
vars_files: vars_files:
- "{{ secure_dir }}/vars/edxapp_ref_users.yml"
- "{{ secure_dir }}/vars/edxapp_sandbox.yml" - "{{ secure_dir }}/vars/edxapp_sandbox.yml"
- "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- nginx - nginx
- edxlocal - edxlocal
- edxapp - edxapp
- xqueue
- xserver
- name: Terminate instances
hosts: localhost
connection: local
tasks:
- name: Terminate instances that were previously launched
local_action:
module: ec2
state: 'absent'
instance_ids: ${ec2.instance_ids}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment