2 - include: postgres-common-preinstall.yml
6 - include: postgres-log-directory.yml
10 - postgres_log_dir is defined and postgres_log_dir
12 - include: postgres-data-directory.yml
15 when: postgres_data_dir is defined and postgres_data_dir
17 - name: fail if no clusters are defined
19 msg: "You probably forgot to define a PostgreSQL cluster on your host (`postgres_clusters` variable). Stopping run of the PostgreSQL role."
20 when: (postgres_clusters is not defined) or (postgres_clusters|length == 0)
22 - include: postgres-cluster.yml
23 loop: "{{ postgres_clusters }}"
25 loop_var: postgres_cluster
29 - include: postgres-common-postinstall.yml
33 - include: postgres-user.yml
34 postgres_username={{ item.1.username }}
35 postgres_password={{ item.1.password }}
36 postgres_port={{ item.0.port }}
37 postgres_permissions={{ item.1.permissions | default('') }}
39 - "{{ postgres_clusters }}"
46 - include: postgres-database.yml
47 postgres_dbname={{ item.1.dbname }}
48 postgres_owner={{ item.1.owner }}
49 postgres_extensions={{ item.1.extensions|default([]) }}
50 postgres_port={{ item.0.port }}
52 - "{{ postgres_clusters }}"
59 - include: postgres-pgupgrades.yml
60 loop: "{{ postgres_pgupgrades }}"
62 loop_var: postgres_pgupgrade
63 when: postgres_pgupgrades is defined