|
3 | 3 | ansible.builtin.fail: |
4 | 4 | msg: "Ansible version must be {{ minimal_ansible_version }} or higher" |
5 | 5 | delegate_to: localhost |
6 | | - when: |
7 | | - - ansible_version.full is version(minimal_ansible_version, '<') |
| 6 | + when: ansible_version.full is version(minimal_ansible_version, '<') |
8 | 7 |
|
9 | 8 | - name: Checking Linux distribution |
10 | 9 | ansible.builtin.fail: |
|
16 | 15 | msg: "{{ ansible_distribution_version }} of {{ ansible_distribution }} is not supported" |
17 | 16 | when: ansible_distribution_version is version_compare(os_minimum_versions[ansible_distribution], '<') |
18 | 17 |
|
| 18 | +- name: Perform pre-checks for system |
| 19 | + ansible.builtin.import_tasks: system.yml |
| 20 | + when: inventory_hostname in groups['postgres_cluster'] |
| 21 | + |
19 | 22 | - name: Perform pre-checks for pgbouncer |
20 | 23 | ansible.builtin.import_tasks: pgbouncer.yml |
21 | 24 | when: |
|
25 | 28 |
|
26 | 29 | - name: Perform pre-checks for patroni |
27 | 30 | ansible.builtin.import_tasks: patroni.yml |
28 | | - when: |
29 | | - - inventory_hostname in groups['postgres_cluster'] |
| 31 | + when: inventory_hostname in groups['postgres_cluster'] |
30 | 32 |
|
31 | 33 | - name: Perform pre-checks for huge_pages |
32 | 34 | ansible.builtin.import_tasks: huge_pages.yml |
33 | | - when: |
34 | | - - inventory_hostname in groups['postgres_cluster'] |
| 35 | + when: inventory_hostname in groups['postgres_cluster'] |
35 | 36 |
|
36 | 37 | - name: Perform pre-checks for pgbackrest |
37 | 38 | ansible.builtin.import_tasks: pgbackrest.yml |
|
47 | 48 | - wal_g_install | bool |
48 | 49 | - inventory_hostname in groups['postgres_cluster'] |
49 | 50 |
|
50 | | -- name: Generate passwords |
51 | | - ansible.builtin.import_tasks: passwords.yml |
52 | | - when: inventory_hostname in groups['postgres_cluster'] |
53 | | - |
54 | 51 | - name: Perform pre-checks for extensions |
55 | 52 | ansible.builtin.import_tasks: extensions.yml |
56 | 53 | when: inventory_hostname == groups['master'][0] |
| 54 | + |
| 55 | +- name: Generate passwords |
| 56 | + ansible.builtin.import_tasks: passwords.yml |
| 57 | + when: inventory_hostname in groups['postgres_cluster'] |
0 commit comments