Skip to content

Commit 1559c2d

Browse files
samrosesoedirgo
authored andcommitted
chore: also deactivate supabase_vault in test (#1439)
* chore: also deactivate supabase_vault in test * chore: check that refs are removed * chore: add a pattern for when vault at end of line * fix: yaml typo * chore: retry on fail for initial installs * chore: revert logic for ansible install
1 parent 2e4b0ae commit 1559c2d

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

ansible/tasks/test-image.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,34 @@
1111
# cmd: sed -i.bak -e "s/pg_net,\ pgsodium,\ timescaledb/pg_net,\ timescaledb/g" -e "s/pgsodium.getkey_script=/#pgsodium.getkey_script=/g" /etc/postgresql/postgresql.conf
1212
# when: debpkg_mode or stage2_nix
1313

14-
- name: Temporarily disable PG Sodium references in config
14+
- name: Temporarily disable PG Sodium and Supabase Vault references in config
1515
become: yes
1616
become_user: postgres
1717
shell:
1818
cmd: >
19-
sed -i.bak
20-
-e 's/\(shared_preload_libraries = '\''.*\)pgsodium,\(.*'\''\)/\1\2/'
19+
sed -i.bak
20+
-e 's/\(shared_preload_libraries = '\''.*\)pgsodium,\(.*'\''\)/\1\2/'
21+
-e 's/\(shared_preload_libraries = '\''.*\)supabase_vault,\(.*'\''\)/\1\2/'
22+
-e 's/\(shared_preload_libraries = '\''.*\), *supabase_vault'\''/\1'\''/'
2123
-e 's/pgsodium.getkey_script=/#pgsodium.getkey_script=/'
2224
/etc/postgresql/postgresql.conf
2325
when: debpkg_mode or stage2_nix
2426

27+
- name: Verify pgsodium and vault removal from config
28+
become: yes
29+
become_user: postgres
30+
shell:
31+
cmd: |
32+
FOUND=$(grep -E "shared_preload_libraries.*pgsodium|shared_preload_libraries.*supabase_vault|^pgsodium\.getkey_script" /etc/postgresql/postgresql.conf)
33+
if [ ! -z "$FOUND" ]; then
34+
echo "Found unremoved references:"
35+
echo "$FOUND"
36+
exit 1
37+
fi
38+
register: verify_result
39+
failed_when: verify_result.rc != 0
40+
when: debpkg_mode or stage2_nix
41+
2542
- name: Start Postgres Database to load all extensions.
2643
become: yes
2744
become_user: postgres

0 commit comments

Comments
 (0)