db_info.yml 395 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
---

- name: Collect and print PostgreSQL version on Ubuntu
  block:
    - name: Collect PostgreSQL version
      become: yes
      become_user: postgres
      postgresql_info:
        filter: ver*
      register: postgresql_version

    - name: Print PostgreSQL version
      debug:
        var: postgresql_version.version.major
15
  when: ansible_facts['distribution_major_version'] == "18"
16
17

...