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