create datanommer timescale instance
This commit is contained in:
parent
64fdf441d1
commit
d523e68a3e
4 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,14 @@
|
|||
Dependencies:
|
||||
- awscli
|
||||
- python3-boto3
|
||||
|
||||
|
||||
Before running any of the EC2 related playbooks, first create a vars file. Use host_vars/datanommer.yml as a reference.
|
||||
When running the playbook add an extra var "-e initiative_name=<vars_file_name>"
|
||||
|
||||
i.e. ansible-playbook create_ec2.yml -e "initiative_name=datanommer"
|
||||
|
||||
When creating a snapshot a description must be passed as an extra var with the key `snap_description`
|
||||
The description should mention why the snaphot was created.
|
||||
|
||||
i.e. ansible-playbook snapshot_ebs_volume.yml -e "initiative_name=datanommer" -e "snap_description=database partitioned by year"
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
roles:
|
||||
- ec2_instance
|
||||
|
||||
post_tasks:
|
||||
- meta: refresh_inventory
|
||||
|
||||
|
||||
- name: Put ssh keys on host
|
||||
hosts: "{{initiative_name}}"
|
||||
|
@ -24,4 +27,5 @@
|
|||
- pingou
|
||||
- mobrien
|
||||
- wwoods
|
||||
- asaleh
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[datanommer]
|
||||
datanommer ansible_host=100.26.18.234
|
||||
[datanommer-test]
|
||||
datanommer-test ansible_host=54.236.16.215
|
||||
[datanommer-timescale]
|
||||
datanommer-timescale ansible_host=54.146.95.101
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
- name: create snapshot
|
||||
ec2_snapshot:
|
||||
volume_id: "{{instance_info.instances[0].block_device_mappings[0].ebs.volume_id}}"
|
||||
description: "Snapshot of volume for the {{instance_name}} ec2 instance"
|
||||
description: "{{ snap_description }}"
|
||||
region: "{{ aws_region }}"
|
||||
wait: no
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue