Skip to content

Commit 4ab5acb

Browse files
committed
Add digital_ocean_spaces_access_key and digital_ocean_spaces_secret_key vars
Introduces access and secret key variables for DigitalOcean Spaces in cloud_resources defaults.
1 parent 6398bd5 commit 4ab5acb

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

automation/roles/cloud_resources/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ azure_blob_storage_absent: false # Allow to delete Azure Blob Storage when delet
6363
digital_ocean_spaces_create: true # if 'cloud_provider=digitalocean'
6464
digital_ocean_spaces_name: "{{ patroni_cluster_name }}-backup" # Name of the Spaces Object Storage (S3 bucket).
6565
digital_ocean_spaces_region: "nyc3" # The region to create the Space in.
66+
digital_ocean_spaces_access_key: "" # (required) Spaces Object Storage ACCESS KEY
67+
digital_ocean_spaces_secret_key: "" # (required) Spaces Object Storage SECRET KEY
6668
digital_ocean_spaces_absent: false # Allow to delete Spaces Object Storage when deleting a cluster servers using the 'state=absent' variable.
6769

6870
hetzner_object_storage_create: true # if 'cloud_provider=hetzner'

automation/roles/pgbackrest/tasks/auto_conf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@
153153
- { option: "log-path", value: "/var/log/pgbackrest" }
154154
- { option: "repo1-type", value: "s3" }
155155
- { option: "repo1-path", value: "{{ pgbackrest_repo_path | default('/pgbackrest') }}" }
156-
- { option: "repo1-s3-key", value: "{{ pgbackrest_s3_key | default(AWS_ACCESS_KEY_ID | default('')) }}" }
157-
- { option: "repo1-s3-key-secret", value: "{{ pgbackrest_s3_key_secret | default(AWS_SECRET_ACCESS_KEY | default('')) }}" }
156+
- { option: "repo1-s3-key", value: "{{ pgbackrest_s3_key | default(digital_ocean_spaces_access_key | default(AWS_ACCESS_KEY_ID | default(''))) }}" }
157+
- { option: "repo1-s3-key-secret", value: "{{ pgbackrest_s3_key_secret | default(digital_ocean_spaces_secret_key | default(AWS_SECRET_ACCESS_KEY | default(''))) }}" }
158158
- { option: "repo1-s3-bucket", value: "{{ pgbackrest_s3_bucket | default(digital_ocean_spaces_name | default(patroni_cluster_name + '-backup')) }}" }
159159
- {
160160
option: "repo1-s3-endpoint",

automation/roles/wal_g/tasks/auto_conf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@
106106
- name: "Set variable 'wal_g_json' for backup in DigitalOcean Spaces Object Storage"
107107
ansible.builtin.set_fact:
108108
wal_g_json:
109-
- { option: "AWS_ACCESS_KEY_ID", value: "{{ wal_g_aws_access_key_id | default(AWS_ACCESS_KEY_ID | default('')) }}" }
110-
- { option: "AWS_SECRET_ACCESS_KEY", value: "{{ wal_g_aws_secret_access_key | default(AWS_SECRET_ACCESS_KEY | default('')) }}" }
109+
- { option: "AWS_ACCESS_KEY_ID", value: "{{ wal_g_aws_access_key_id | default(digital_ocean_spaces_access_key | default(AWS_ACCESS_KEY_ID | default(''))) }}" }
110+
- { option: "AWS_SECRET_ACCESS_KEY", value: "{{ wal_g_aws_secret_access_key | default(digital_ocean_spaces_secret_key | default(AWS_SECRET_ACCESS_KEY | default(''))) }}" }
111111
- {
112112
option: "AWS_ENDPOINT",
113113
value: "{{ wal_g_s3_endpoint | default('https://' + (digital_ocean_spaces_region | default(server_location)) + '.digitaloceanspaces.com') }}",

0 commit comments

Comments
 (0)