---
- name: zram | Configure {{ zram_num_devices }} zram devices
  template:
    src: zram.j2
    dest: /etc/modprobe.d/zram.conf
    owner: root
    group: root
    mode: 0644

- name: zram | Add zram.start hook for local service
  template:
    src: zram-start.j2
    dest: /etc/local.d/zram.start
    owner: root
    group: root
    mode: 0755

- name: zram | Add zram.stop hook for local service
  template:
    src: zram-stop.j2
    dest: /etc/local.d/zram.stop
    owner: root
    group: root
    mode: 0755

- name: zram | Add local service to runlevel 'default'
  service:
    name: local
    runlevel: default
    enabled: yes
    state: started
