Skip to content

Commit c095568

Browse files
staaldraadhunleyd
andauthored
Apply suggestion from @hunleyd
Co-authored-by: Douglas J Hunley <[email protected]>
1 parent 64f76c0 commit c095568

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

ansible/tasks/stage2-setup-postgres.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,24 @@
9595
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src"
9696
when: stage2_nix
9797

98-
- name: Check psql_version and install gatekeeper if not pg15
98+
- name: Check if psql_version is psql_15
99+
set_fact:
100+
is_psql_15: "{{ psql_version == 'psql_15' }}"
101+
102+
- name: Install gatekeeper if not pg15
103+
when:
104+
- stage2_nix
105+
- not is_pgsql_15
99106
block:
100-
- name: Check if psql_version is psql_15
101-
set_fact:
102-
is_psql_15: "{{ psql_version == 'psql_15' }}"
103-
104-
- name: Install gatekeeper from nix binary cache
107+
- name: Install gatekeeper from nix binary cache
105108
become: yes
106109
shell: |
107110
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#gatekeeper"
108-
when: stage2_nix and not is_psql_15
109111
110112
- name: Create symbolic link for linux-pam to find pam_jit_pg.so
111113
shell: >
112114
sudo ln -s /var/lib/postgresql/.nix-profile/lib/security/pam_jit_pg.so $(find /nix/store -type d -path "/nix/store/*-linux-pam-*/lib/security" -print -quit)/pam_jit_pg.so
113115
become: yes
114-
when: stage2_nix and not is_psql_15
115116

116117
- name: Set ownership and permissions for /etc/ssl/private
117118
become: yes

0 commit comments

Comments
 (0)