---
- name: zram | Configure zram devices
  template:
    src: zram/zram.j2
    dest: /etc/modprobe.d/zram.conf
    owner: root
    group: root
    mode: '644'

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

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

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