---
- name: earlyoom | Install earlyoom package
  community.general.apk:
    name: earlyoom
    state: present

- name: earlyoom | Copy service configuration
  template:
    src: earlyoom/conf.j2
    dest: /etc/conf.d/earlyoom
    mode: '644'
    owner: root
    group: root

- name: earlyoom | Start earlyoom service on runlevel 'default'
  service:
    name: earlyoom
    runlevel: default
    enabled: true
    state: started
