Skip to content

Commit 47ab241

Browse files
committed
fix(setup-pgbouncer): use with_items instead of loop
1 parent a0333c8 commit 47ab241

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ansible/tasks/setup-pgbouncer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@
5050
shell: '/usr/sbin/nolign'
5151
state: 'present'
5252

53-
- name: PgBouncer - create a directory if it does not exist
53+
- name: Create PgBouncer directories if they does not exist
5454
ansible.builtin.file:
5555
group: 'pgbouncer'
5656
mode: "{{ pgbouncer_dir_item['mode'] }}"
5757
owner: 'pgbouncer'
5858
path: "{{ pgbouncer_dir_item['dir'] }}"
5959
state: 'directory'
60-
loop:
61-
- "{ mode: '0700', dir: '/etc/pgbouncer'}"
62-
- "{ mode: '0775', dir: '/etc/pgbouncer-custom'}"
6360
loop_control:
6461
loop_var: 'pgbouncer_dir_item'
62+
with_items:
63+
- "{ mode: '0700', dir: '/etc/pgbouncer' }"
64+
- "{ mode: '0775', dir: '/etc/pgbouncer-custom' }"
6565

6666
- name: create PgBouncer placeholder config files
6767
ansible.builtin.file:

0 commit comments

Comments
 (0)