--- - name: "Install PostgreSQL client" become: true ansible.builtin.package: name: "{{ postgresql_backup.required_packages }}" state: present - name: "Install tar and gzip" become: true ansible.builtin.package: name: "{{ postgresql_backup.optional_packages }}" state: present when: postgresql_backup.create_tar_gz | bool