Skip to content

Commit 12abec0

Browse files
committed
feat: provide jq correct
1 parent c917ba8 commit 12abec0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ansible/files/postgres_prestart.sh.j2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ get_pg_cron_version() {
5151
return
5252
fi
5353

54-
# Run jq from nixpkgs
5554
local version
56-
version=$(nix run nixpkgs#jq -- -r '.pg_cron // empty' "/root/pg_extensions.json")
55+
version=$(jq -r '.pg_cron // empty' "/root/pg_extensions.json")
5756
if [ -z "$version" ]; then
5857
log "pg_cron: Not specified in extensions file"
5958
return

ansible/tasks/stage2-setup-postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
- name: Install jq from nix binary cache
9999
become: yes
100100
shell: |
101-
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#jq"
101+
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#jq --profile /nix/var/nix/profiles/default
102102
when: stage2_nix
103103

104104
- name: Set ownership and permissions for /etc/ssl/private

0 commit comments

Comments
 (0)