Skip to content

Commit b9ec118

Browse files
committed
fix(stage2-setup-postgres): fine, you win. we won't loop, and we'll do it the long, slow ass way
1 parent 113abe7 commit b9ec118

File tree

1 file changed

+48
-24
lines changed

1 file changed

+48
-24
lines changed

ansible/tasks/stage2-setup-postgres.yml

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,37 +165,61 @@
165165
src: '/var/lib/postgresql/.nix-profile/bin/pg_config'
166166
state: 'link'
167167

168-
- name: Find all links in /var/lib/postgresql/.nix-profile/share/{postgresql,extension, timezonesets, tsearch_data}
168+
- name: Find all links in /var/lib/postgresql/.nix-profile/share/postgresql
169169
ansible.builtin.find:
170170
depth: 1
171171
file_type: 'link'
172-
path: "/var/lib/postgresql/.nix-profile/share/{{ share_item }}"
173-
loop:
174-
- postgresql
175-
- extension
176-
- timezonesets
177-
- tsearch_data
178-
loop_control:
179-
loop_var: 'share_item'
180-
register: "{{ reg_var }}"
181-
vars:
182-
reg_var: "{{ share_item }}_links"
172+
path: '/var/lib/postgresql/.nix-profile/share/postgresql'
173+
register: 'postgresql_links'
174+
175+
- name: Find all links in /var/lib/postgresql/.nix-profile/share/extension
176+
ansible.builtin.find:
177+
depth: 1
178+
file_type: 'link'
179+
path: '/var/lib/postgresql/.nix-profile/share/extension'
180+
register: 'extension_links'
181+
182+
- name: Find all links in /var/lib/postgresql/.nix-profile/share/timezonesets
183+
ansible.builtin.find:
184+
depth: 1
185+
file_type: 'link'
186+
path: '/var/lib/postgresql/.nix-profile/share/timezonesets'
187+
register: 'timezonesets_links'
188+
189+
- name: Find all links in /var/lib/postgresql/.nix-profile/share/tsearch_data
190+
ansible.builtin.find:
191+
depth: 1
192+
file_type: 'link'
193+
path: '/var/lib/postgresql/.nix-profile/share/tsearch_data'
194+
register: 'tsearch_data_links'
183195

184-
- name: Find all files in /var/lib/postgresql/.nix-profile/share/{postgresql,extension, timezonesets, tsearch_data}
196+
- name: Find all files in /var/lib/postgresql/.nix-profile/share/postgresql
185197
ansible.builtin.find:
186198
depth: 1
187199
file_type: 'file'
188-
path: "/var/lib/postgresql/.nix-profile/share/{{ share_item }}"
189-
loop:
190-
- postgresql
191-
- extension
192-
- timezonesets
193-
- tsearch_data
194-
loop_control:
195-
loop_var ' share_item'
196-
register: "{{ reg_var }}"
197-
vars:
198-
reg_var: "{{ share_item }}_files"
200+
path: '/var/lib/postgresql/.nix-profile/share/postgresql'
201+
register: 'postgresql_files'
202+
203+
- name: Find all files in /var/lib/postgresql/.nix-profile/share/extension
204+
ansible.builtin.find:
205+
depth: 1
206+
file_type: 'file'
207+
path: '/var/lib/postgresql/.nix-profile/share/extension'
208+
register: 'extension_files'
209+
210+
- name: Find all files in /var/lib/postgresql/.nix-profile/share/timezonesets
211+
ansible.builtin.find:
212+
depth: 1
213+
file_type: 'file'
214+
path: '/var/lib/postgresql/.nix-profile/share/timezonesets'
215+
register: 'timezonesets_files'
216+
217+
- name: Find all files in /var/lib/postgresql/.nix-profile/share/tsearch_data
218+
ansible.builtin.find:
219+
depth: 1
220+
file_type: 'file'
221+
path: '/var/lib/postgresql/.nix-profile/share/tsearch_data'
222+
register: 'tsearch_data_files'
199223

200224
- name: Create symlinks for PG share links into /usr/lib/postgresql/share/postgresql
201225
ansible.builtin.file:

0 commit comments

Comments
 (0)