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