---
- name: acpid | Install acpid and acpi-utils
  community.general.apk:
    name: acpid, acpi-utils
    state: present

- name: acpid | Copy acpid event handler script
  copy:
    src: acpi/handler.sh
    dest: /etc/acpi/handler.sh
    mode: '755'
    owner: root
    group: root

- name: acpid | Use process supervisor for acpid service
  lineinfile:
    path: /etc/conf.d/acpid
    search_string: supervisor=
    line: supervisor="supervise-daemon"
    state: present
    owner: root
    group: root
    mode: '644'
