Skip to content
Ansible scripts to switch whole environment on/off
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
roles
tests
vars
.travis.yml
README.md
ec2.ini
ec2.py
start_environment.yml
stop_environment.yml

README.md

aws-switch-off-environment

Build Status

Ansible playbook to switch whole environment on/off It will do the following:

  • Start / Stop Elasticache servers
  • Start / Stop EC2 Instances matching a certain tag
  • Scale down ASG groups defined

Requirements

Ansible 2.x

Playbook variables

All of the variables are set in vars/default.yml

Variable Description Default
environment_base_domain Base domain on which elasticache servers will reside test.com
environment_region Region in which script is run eu-west-1
environment_tag EC2 Instance Tag Key Environment
environment_cache_servers List of elastcache servers to start, with parameters {}
environment_asg_groups List of ASG groups to scale up/down {}

Example Run

ansible-playbook -i ec2.py stop_environment.yml -e "env=staging"

License

MIT / BSD

Author Information

Kasia Gogolek kasia@gogolek.co.uk

You can’t perform that action at this time.