Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
93056a9b
Commit
93056a9b
authored
Jul 13, 2018
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A new playbook we can use to create RDSes
parent
c58ce173
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
playbooks/create_rds.yml
+59
-0
No files found.
playbooks/create_rds.yml
0 → 100644
View file @
93056a9b
# This play will create an RDS for an application.
# It can be run like so:
#
# ansible-playbook -c local -i 'localhost,' create_rds.yml -e@./db.yml
#
# where the content of db.yml contains the following settings
#
# It can read from the same config as create_dbs_and_users.yml and needs this
# part of that config
# database_connection:
# login_user: "root"
# login_password: "super-secure-password"
#
# database_name: your-database-name
# database_size: number of gigabytes (integer)
# instance_type: Choose an AWS RDS instance type such as "db.t2.medium"
# aws_region: a full region (such as us-east-1 or us-west-2) not an AZ
# database_engine_version: You should use either or standard or the newest possible, such as "5.6.39"
# maintenance_window: UTC time and day of week to allow maintenance "Mon:16:00-Mon:16:30"
# vpc_security_groups: What security group in the VPC your RDS should belong to (this is separate from your app or elb SG)
# subnet_group: a name of a group in the RDS console that contains subnets, it will pick the appropriate one
# parameter_group: name of the parameter group with overriddent defaults for this RDS
# backup_window: UTC time of the day to take a backup "08:00-08:30"
# backup_retention: Days to keep backups (integer)
# multi_zone: yes or no (whether this RDS is multi-az)
# tags:
# environment: "environment"
# deployment: "deployment"
# cluster: "cluster"
-
name
:
Create databases and users
hosts
:
all
gather_facts
:
False
tasks
:
-
name
:
create RDS
rds
:
command
:
create
instance_name
:
"
{{
database_name
}}"
db_engine
:
"
{{
database_engine|default('MySQL')
}}"
size
:
"
{{
database_size
}}"
instance_type
:
"
{{
instance_type
}}"
region
:
"
{{
aws_region
}}"
username
:
"
{{
database_connection.login_user
}}"
password
:
"
{{
database_connection.login_password
}}"
engine_version
:
"
{{
database_engine_version
}}"
maint_window
:
"
{{
maintenance_window
}}"
multi_zone
:
"
{{
multi_zone
}}"
vpc_security_groups
:
"
{{
vpc_security_groups
}}"
subnet
:
"
{{
subnet_group
}}"
parameter_group
:
"
{{
parameter_group
}}"
backup_window
:
"
{{
backup_window
}}"
backup_retention
:
"
{{
backup_retention
}}"
tags
:
"
{{
tags
}}"
# It would be nice to wait for success, but this takes a while and I routinely tripped
# the API call limit at AWS. Add it back if we know how to limit those.
# wait: yes
# wait_timeout: 900
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment