--- - name: Install smartctl_exporter (Debian) ansible.builtin.apt: name: prometheus-smartctl-exporter state: present when: ansible_facts["os_family"] == "Debian" become: true - name: Install smartctl_exporter (Arch) aur: name: prometheus-smartctl-exporter use: "{{ aur_helper }}" state: present when: ansible_facts["os_family"] == "Archlinux" - name: Enable and start smartctl_exporter service ansible.builtin.systemd: name: prometheus-smartctl-exporter state: started enabled: true become: true