Skip to content

Commit abf8140

Browse files
committed
refactor(setup-postgres): use the cmd form instead of the argv form
1 parent 43bd138 commit abf8140

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

ansible/tasks/setup-postgres.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,7 @@
206206
become: true
207207
become_user: 'postgres'
208208
ansible.builtin.command:
209-
argv:
210-
- /usr/lib/postgresql/bin/pg_ctl
211-
- -D /var/lib/postgresql/data
212-
- initdb
213-
- -o "--allow-group-access"
214-
- -o "--username=supabase_admin"
209+
cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb --allow-group-access --username=supabase_admin
215210
vars:
216211
ansible_command_timeout: 60
217212
when:
@@ -239,12 +234,7 @@
239234
become: true
240235
become_user: 'postgres'
241236
ansible.builtin.command:
242-
argv:
243-
- /usr/lib/postgresql/bin/pg_ctl
244-
- -D /var/lib/postgresql/data
245-
- initdb
246-
- -o "--allow-group-access"
247-
- -o "--username=supabase_admin"
237+
cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb --allow-group-access --username=supabase_admin
248238
environment:
249239
LANG: en_US.UTF-8
250240
LANGUAGE: en_US.UTF-8
@@ -261,15 +251,7 @@
261251
become: true
262252
become_user: 'postgres'
263253
ansible.builtin.command:
264-
argv:
265-
- /usr/lib/postgresql/bin/pg_ctl
266-
- -D /var/lib/postgresql/data
267-
- initdb
268-
- -o "--allow-group-access"
269-
- -o "--username=supabase_admin"
270-
- -o "--locale-provider=icu"
271-
- -o "--encoding=UTF-8"
272-
- -o "--icu-locale=en_US.UTF-8"
254+
cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb --allow-group-access --username=supabase_admin --locale-provider=icu --encoding=UTF-8 --icu-locale=en_US.UTF-8
273255
environment:
274256
LANG: en_US.UTF-8
275257
LANGUAGE: en_US.UTF-8

0 commit comments

Comments
 (0)