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