Skip to content

Commit 1655321

Browse files
authored
Add deployment ID for bucket naming (#149)
1 parent 4f0df3c commit 1655321

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ choose_demo_example_aws.yml
99
*artifact*.json
1010
**/roles/*
1111
!**/roles/requirements.yml
12+
.deployment_id

cloud/setup.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
_deployment_id: "{{ lookup('file', playbook_dir + '/.deployment_id') }}"
3+
24
user_message:
35

46
controller_execution_environments:
@@ -284,6 +286,7 @@ controller_templates:
284286
notification_templates_error: Telemetry
285287
extra_vars:
286288
aws_report: vpc
289+
reports_aws_bucket_name: reports-pd-{{ _deployment_id }}
287290
survey_enabled: true
288291
survey:
289292
name: ''
@@ -312,6 +315,7 @@ controller_templates:
312315
notification_templates_error: Telemetry
313316
extra_vars:
314317
aws_report: tags
318+
reports_aws_bucket_name: reports-pd-{{ _deployment_id }}
315319
survey_enabled: true
316320
survey:
317321
name: ''

setup_demo.yml

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
- name: "SESSION_COOKIE_AGE"
5050
value: 180000
5151

52+
- name: Create reusable deployment ID
53+
ansible.builtin.set_fact:
54+
_deployment_id: '{{ lookup("ansible.builtin.password", "{{ playbook_dir }}/.deployment_id", chars=["ascii_lowercase", "digits"], length=5) }}'
55+
5256
- name: "Include configuration for {{ demo }}"
5357
ansible.builtin.include_vars: "{{ demo }}/setup.yml"
5458

0 commit comments

Comments
 (0)