Last active
October 1, 2018 04:31
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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