---
- name: Install earlyoom
  apt:
    pkg:
      - earlyoom
    state:
      present
  register: result
  until: result.failed == false
  retries: 5
  delay: 120

- name: Enable earlyoom
  systemd:
    name: earlyoom
    state: started
    enabled: yes
