|
138 | 138 | dest: /etc/postgresql/postgresql.conf
|
139 | 139 | group: postgres
|
140 | 140 | when: debpkg_mode or nixpkg_mode
|
141 |
| - |
142 |
| -# Add pg_hba.conf |
143 | 141 | - name: import pg_hba.conf
|
144 |
| - template: |
145 |
| - src: files/postgresql_config/pg_hba.conf.j2 |
146 |
| - dest: /etc/postgresql/pg_hba.conf |
147 |
| - group: postgres |
148 |
| - when: debpkg_mode or nixpkg_mode |
149 |
| - |
150 |
| -# Add pg_hba_public.conf |
151 |
| -- name: import pg_hba_public.conf |
152 |
| - template: |
153 |
| - src: files/postgresql_config/pg_hba_public.conf.j2 |
154 |
| - dest: /etc/postgresql/pg_hba_public.conf |
155 |
| - group: postgres |
156 |
| - when: debpkg_mode or nixpkg_mode |
157 |
| - |
158 |
| -# Add pg_hba_users_public.conf |
159 |
| -- name: import pg_hba_users_public.conf |
160 |
| - template: |
161 |
| - src: files/postgresql_config/pg_hba_users_public.conf.j2 |
162 |
| - dest: /etc/postgresql/pg_hba_users_public.conf |
163 |
| - group: postgres |
164 |
| - when: debpkg_mode or nixpkg_mode |
| 142 | + block: |
| 143 | + - name: Check if psql_version is 15 |
| 144 | + set_fact: |
| 145 | + is_psql_15: "{{ psql_version in ['psql_15'] }}" |
| 146 | + # Add pg_hba.conf |
| 147 | + - name: import pg_hba.conf psql_15 |
| 148 | + template: |
| 149 | + src: files/postgresql_config/pg_hba.conf_15.j2 |
| 150 | + dest: /etc/postgresql/pg_hba.conf |
| 151 | + group: postgres |
| 152 | + when: (debpkg_mode or nixpkg_mode) and is_psql_15 |
| 153 | + - name: import pg_hba.conf |
| 154 | + template: |
| 155 | + src: files/postgresql_config/pg_hba.conf.j2 |
| 156 | + dest: /etc/postgresql/pg_hba.conf |
| 157 | + group: postgres |
| 158 | + when: (debpkg_mode or nixpkg_mode) and not is_psql_15 |
| 159 | + |
| 160 | + # Add pg_hba_public.conf |
| 161 | + - name: import pg_hba_public.conf |
| 162 | + template: |
| 163 | + src: files/postgresql_config/pg_hba_public.conf.j2 |
| 164 | + dest: /etc/postgresql/pg_hba_public.conf |
| 165 | + group: postgres |
| 166 | + when: (debpkg_mode or nixpkg_mode) and not is_psql_15 |
| 167 | + |
| 168 | + # Add pg_hba_users_public.conf |
| 169 | + - name: import pg_hba_users_public.conf |
| 170 | + template: |
| 171 | + src: files/postgresql_config/pg_hba_users_public.conf.j2 |
| 172 | + dest: /etc/postgresql/pg_hba_users_public.conf |
| 173 | + group: postgres |
| 174 | + when: (debpkg_mode or nixpkg_mode) and not is_psql_15 |
165 | 175 |
|
166 | 176 | # Add pg_ident.conf
|
167 | 177 | - name: import pg_ident.conf
|
|
0 commit comments