--- - name: "[Alpine] Install package: postgresql" apk: name: postgresql postgresql-contrib state: present when: - ansible_distribution == "Alpine" - name: "[Archlinux] Install package: postgresql" pacman: name: postgresql postgresql-contrib state: present when: - ansible_distribution == "Archlinux"