-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcontribute_teardown.yml
87 lines (64 loc) · 3.11 KB
/
contribute_teardown.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
- hosts: localhost
gather_facts: False
tasks:
- name: Copy to development vault to credentials folder
copy:
src: inventories/development/group_vars/all/vault
dest: ../railway-credentials/development_vault
mode: 0600
- name: Copy placeholder development vault to project folder
copy:
src: ../railway-credentials/placeholder_development_vault
dest: inventories/development/group_vars/all/vault
mode: 0600
- name: Copy production vault to credentials folder
copy:
src: inventories/production/group_vars/all/vault
dest: ../railway-credentials/production_vault
mode: 0600
- name: Copy placeholder production vault to project folder
copy:
src: ../railway-credentials/placeholder_production_vault
dest: inventories/production/group_vars/all/vault
mode: 0600
- name: Copy the development EC2 key pair to the credentials folder
copy:
src: roles/aws_ec2_create/files/ansible-ec2-development.pem
dest: ../railway-credentials/ansible-ec2-development.pem
- name: Clear development EC2 key pair
copy:
content: 'Replace this file with your development EC2 key pair and encrypt it with "ansible-vault encrypt roles/aws_ec2_create/files/ansible-ec2-development.pem"'
dest: roles/aws_ec2_create/files/ansible-ec2-development.pem
- name: Copy the production EC2 key pair to the credentials folder
copy:
src: roles/aws_ec2_create/files/ansible-ec2-production.pem
dest: ../railway-credentials/ansible-ec2-production.pem
- name: Clear production EC2 key pair
copy:
content: 'Replace this file with your production EC2 key pair and encrypt it with "ansible-vault encrypt roles/aws_ec2_create/files/ansible-ec2-production.pem"'
dest: roles/aws_ec2_create/files/ansible-ec2-production.pem
- name: Copy the development deploy key credentials folder
copy:
src: roles/app_bootstrap/files/development/deploy_id_rsa
dest: ../railway-credentials/development_deploy_id_rsa
- name: Clear development deploy key
copy:
content: 'Replace this file with your private deploy key and encrypt it with "ansible-vault encrypt roles/app_bootstrap/files/development/deploy_id_rsa"'
dest: roles/app_bootstrap/files/development/deploy_id_rsa
- name: Copy the production deploy key credentials folder
copy:
src: roles/app_bootstrap/files/production/deploy_id_rsa
dest: ../railway-credentials/production_deploy_id_rsa
- name: Clear production deploy key
copy:
content: 'Replace this file with your private deploy key and encrypt it with "ansible-vault encrypt roles/app_bootstrap/files/production/deploy_id_rsa"'
dest: roles/app_bootstrap/files/production/deploy_id_rsa
- name: Remove the development master.key
file:
path: roles/app_bootstrap/files/development/master.key
state: absent
- name: Remove the production master.key
file:
path: roles/app_bootstrap/files/production/master.key
state: absent