Skip to content

Commit a045833

Browse files
committed
Fix json, add fail to sh script
1 parent c8d0197 commit a045833

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ansible/roles/mongo-backup-service/files/backup-to-digitalocean-bucket.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail
23

34
filename="dump-$(date '+%Y%m%d%H%M%S').gz"
45

ansible/roles/mongo-backup-service/tasks/main.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
community.general.systemd_creds_encrypt:
88
name: do_access_secret
99
pretty: true
10-
secret: |
11-
{
12-
"id": "{{ lookup('ansible.builtin.env', 'DO_SPACES_ACCESS_ID') }}",
13-
"key": "{{ lookup('ansible.builtin.env', 'DO_SPACES_ACCESS_KEY') }}"
14-
}
10+
secret: >
11+
{{ {
12+
'id': lookup('ansible.builtin.env', 'DO_SPACES_ACCESS_ID') ,
13+
'key': lookup('ansible.builtin.env', 'DO_SPACES_ACCESS_KEY')
14+
} | to_json }}
1515
register: do_access_secret
1616

1717
- name: Copy script to remote server

0 commit comments

Comments
 (0)