Skip to content

Instantly share code, notes, and snippets.

@tomwwright
Last active October 1, 2018 04:31
Show Gist options
  • Save tomwwright/7036655891aef872f587bec99b22f197 to your computer and use it in GitHub Desktop.
Save tomwwright/7036655891aef872f587bec99b22f197 to your computer and use it in GitHub Desktop.
Medium : Ansible and the AWS CLI : Aurora Clusters example https://medium.com/@tomwwright/ansible-and-the-aws-cli-no-module-no-problem-27580d36ef2d
- hosts: localhost
vars:
aurora_cluster_name: mycoolauroracluster
aurora_cluster_engine: aurora-mysql
aurora_cluster_version: 5.7.12
aws_region: ap-southeast-2
tasks:
- name: create Aurora Cluster with the AWS CLI
command: >
aws rds create-db-cluster
--region {{ aws_region }}
--cli-input-json '{{ lookup('template', 'create-db-cluster.json.j2') | to_json }}'
{
"DBClusterIdentifier": "{{ aurora_cluster_name }}",
"Engine": "{{ aurora_cluster_engine }}",
"EngineVersion": "{{ aurora_cluster_version }}",
"MasterUsername": "ansible",
"MasterUserPassword": "supersecure"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment