Skip to content

Commit 8201db6

Browse files
committed
fix(setup-wal-g): become_user doesn't source /etc/profile.d, so switch back to the shell module :(
1 parent 7a1bd07 commit 8201db6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ansible/tasks/setup-wal-g.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@
2929
- stage2_nix
3030
block:
3131
- name: Install wal-g 2 from nix binary cache
32-
ansible.builtin.command:
33-
cmd: "nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-2"
32+
ansible.builtin.shell:
33+
cmd: sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-2"
3434
become: true
35-
become_user: 'wal-g'
3635

3736
- name: Install wal-g 3 from nix binary cache
38-
ansible.builtin.command:
39-
cmd: "nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-3"
37+
ansible.builtin.shell:
38+
cmd: sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-3"
4039
become: true
41-
become_user: 'wal-g'
4240

4341
- name: Create symlink for wal-g-3 from Nix profile to /usr/local/bin
4442
ansible.builtin.file:

0 commit comments

Comments
 (0)