Skip to content

Commit e6bf483

Browse files
committed
add loop
Signed-off-by: Anis FATHALLAH <anis@fathallah.fr>
1 parent bdf40fe commit e6bf483

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

roles/deployment/databases/tasks/postgresql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- name: Ensure psycopg2 is installed
1818
package:
1919
name: "{{ ((hostvars[databases[item].host]['ansible_os_family'] == 'RedHat') and (hostvars[databases[item].host]['ansible_distribution_major_version'] == '7')) | ternary('python-psycopg2', 'python3-psycopg2') }}"
20+
with_items: "{{ databases }}"
2021
delegate_to: "{{ databases[item].host }}"
2122
connection: ssh
2223
when: databases[item].host in groups.db_server

0 commit comments

Comments
 (0)