- hosts:
    - knot
  vars:
    url: https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-18.04-amd64
    checksum: 5d17f2fa8915ad2ce2f460a119cf652e735b85a2333e9843a4c7fd56ae074f4a
  tasks:
    - name: Installing wal-g as /var/lib/postgresql/wal-g
      become: yes
      ansible.builtin.get_url:
        url: "{{ url }}"
        checksum: "sha256:{{ checksum }}"
        dest: "/var/lib/postgresql/wal-g"
        mode: a+rx
        owner: root
        group: root