|
167 | 167 | src: '/var/lib/postgresql/.nix-profile/bin/pg_config' |
168 | 168 | state: 'link' |
169 | 169 |
|
170 | | - - name: Find all links in /var/lib/postgresql/.nix-profile/share/postgresql |
171 | | - ansible.builtin.find: |
172 | | - depth: 1 |
173 | | - file_type: 'link' |
174 | | - path: '/var/lib/postgresql/.nix-profile/share/postgresql' |
175 | | - register: 'postgresql_links' |
176 | | - |
177 | | - - name: Find all links in /var/lib/postgresql/.nix-profile/share/extension |
178 | | - ansible.builtin.find: |
179 | | - depth: 1 |
180 | | - file_type: 'link' |
181 | | - path: '/var/lib/postgresql/.nix-profile/share/extension' |
182 | | - register: 'extension_links' |
183 | | - |
184 | | - - name: Find all links in /var/lib/postgresql/.nix-profile/share/timezonesets |
185 | | - ansible.builtin.find: |
186 | | - depth: 1 |
187 | | - file_type: 'link' |
188 | | - path: '/var/lib/postgresql/.nix-profile/share/timezonesets' |
189 | | - register: 'timezonesets_links' |
190 | | - |
191 | | - - name: Find all links in /var/lib/postgresql/.nix-profile/share/tsearch_data |
192 | | - ansible.builtin.find: |
193 | | - depth: 1 |
194 | | - file_type: 'link' |
195 | | - path: '/var/lib/postgresql/.nix-profile/share/tsearch_data' |
196 | | - register: 'tsearch_data_links' |
197 | | - |
198 | | - - name: Find all files in /var/lib/postgresql/.nix-profile/share/postgresql |
199 | | - ansible.builtin.find: |
200 | | - depth: 1 |
201 | | - file_type: 'file' |
202 | | - path: '/var/lib/postgresql/.nix-profile/share/postgresql' |
203 | | - register: 'postgresql_files' |
204 | | - |
205 | | - - name: Find all files in /var/lib/postgresql/.nix-profile/share/extension |
206 | | - ansible.builtin.find: |
207 | | - depth: 1 |
208 | | - file_type: 'file' |
209 | | - path: '/var/lib/postgresql/.nix-profile/share/extension' |
210 | | - register: 'extension_files' |
211 | | - |
212 | | - - name: Find all files in /var/lib/postgresql/.nix-profile/share/timezonesets |
213 | | - ansible.builtin.find: |
214 | | - depth: 1 |
215 | | - file_type: 'file' |
216 | | - path: '/var/lib/postgresql/.nix-profile/share/timezonesets' |
217 | | - register: 'timezonesets_files' |
218 | | - |
219 | | - - name: Find all files in /var/lib/postgresql/.nix-profile/share/tsearch_data |
220 | | - ansible.builtin.find: |
221 | | - depth: 1 |
222 | | - file_type: 'file' |
223 | | - path: '/var/lib/postgresql/.nix-profile/share/tsearch_data' |
224 | | - register: 'tsearch_data_files' |
225 | | - |
226 | | - - name: Create symlinks for PG share links into /usr/lib/postgresql/share/postgresql |
| 170 | + - name: Create symlinks for PG share links into /usr/lib/postgresql/share |
227 | 171 | ansible.builtin.file: |
228 | 172 | force: true |
229 | 173 | group: 'postgres' |
230 | 174 | owner: 'postgres' |
231 | | - path: "/usr/lib/postgresql/share/postgresql/{{ link_item['path'] | basename }}" |
232 | | - src: "{{ link_item['path'] }}" |
| 175 | + path: '/usr/lib/postgresql/share' |
| 176 | + src: '/var/lib/postgresql/.nix-profile/share' |
233 | 177 | state: 'link' |
234 | | - loop: "{{ postgresql_links['files'] }}" |
235 | | - loop_control: |
236 | | - loop_var: 'link_item' |
237 | | - |
238 | | - - name: Create symlinks for PG share files into /usr/lib/postgresql/share/postgresql |
239 | | - ansible.builtin.file: |
240 | | - group: 'postgres' |
241 | | - owner: 'postgres' |
242 | | - path: "/usr/lib/postgresql/share/postgresql/{{ file_item['path'] | basename }}" |
243 | | - src: "{{ file_item['path'] }}" |
244 | | - state: 'link' |
245 | | - loop: "{{ postgresql_files['files'] }}" |
246 | | - loop_control: |
247 | | - loop_var: 'file_item' |
248 | | - |
249 | | - - name: Create symlinks for PG share links into /usr/lib/postgresql/share/extension |
250 | | - ansible.builtin.file: |
251 | | - group: 'postgres' |
252 | | - owner: 'postgres' |
253 | | - path: "/usr/share/postgresql/share/extension/{{ link_item['path'] | basename }}" |
254 | | - src: "{{ link_item['path'] }}" |
255 | | - state: 'link' |
256 | | - loop: "{{ extension_links['files'] }}" |
257 | | - loop_control: |
258 | | - loop_var: 'link_item' |
259 | | - |
260 | | - - name: Create symlinks for PG share files into /usr/lib/postgresql/share/extension |
261 | | - ansible.builtin.file: |
262 | | - group: 'postgres' |
263 | | - owner: 'postgres' |
264 | | - path: "/usr/lib/postgresql/share/extension/{{ file_item['path'] | basename }}" |
265 | | - src: "{{ file_item['path'] }}" |
266 | | - state: 'link' |
267 | | - loop: "{{ extension_files['files'] }}" |
268 | | - loop_control: |
269 | | - loop_var: 'file_item' |
270 | | - |
271 | | - - name: Create symlinks for PG share links into /usr/lib/postgresql/share/timezonesets |
272 | | - ansible.builtin.file: |
273 | | - group: 'postgres' |
274 | | - owner: 'postgres' |
275 | | - path: "/usr/lib/postgresql/share/timezonesets/{{ link_item['path'] | basename }}" |
276 | | - src: "{{ link_item['path'] }}" |
277 | | - state: 'link' |
278 | | - loop: "{{ timezonesets_links['files'] }}" |
279 | | - loop_control: |
280 | | - loop_var: 'link_item' |
281 | | - |
282 | | - - name: Create symlinks for PG share files into /usr/lib/postgresql/share/timezonesets |
283 | | - ansible.builtin.file: |
284 | | - group: 'postgres' |
285 | | - owner: 'postgres' |
286 | | - path: "/usr/lib/postgresql/share/timezonesets/{{ file_item['path'] | basename }}" |
287 | | - src: "{{ file_item['path'] }}" |
288 | | - state: 'link' |
289 | | - loop: "{{ timezonesets_files['files'] }}" |
290 | | - loop_control: |
291 | | - loop_var: 'file_item' |
292 | | - |
293 | | - - name: Create symlinks for PG share links into /usr/lib/postgresql/share/tsearch_data |
294 | | - ansible.builtin.file: |
295 | | - group: 'postgres' |
296 | | - owner: 'postgres' |
297 | | - path: "/usr/lib/postgresql/share/tsearch_data/{{ link_item['path'] | basename }}" |
298 | | - src: "{{ link_item['path'] }}" |
299 | | - state: 'link' |
300 | | - loop: "{{ tsearch_data_links['files'] }}" |
301 | | - loop_control: |
302 | | - loop_var: 'link_item' |
303 | | - |
304 | | - - name: Create symlinks for PG share files into /usr/lib/postgresql/share/tsearch_data |
305 | | - ansible.builtin.file: |
306 | | - group: 'postgres' |
307 | | - owner: 'postgres' |
308 | | - path: "/usr/lib/postgresql/share/tsearch_data/{{ file_item['path'] | basename }}" |
309 | | - src: "{{ file_item['path'] }}" |
310 | | - state: 'link' |
311 | | - loop: "{{ tsearch_data_files['files'] }}" |
312 | | - loop_control: |
313 | | - loop_var: 'file_item' |
314 | 178 |
|
315 | 179 | - name: create destination directory |
316 | 180 | ansible.builtin.file: |
|
0 commit comments