# By the time we get here we should have ka-lite of some version
# And the systemd unit files should be defined

- name: Enable 'kalite-serve' service
  service:
    name: kalite-serve
    enabled: yes
    state: started

- name: Disable 'kalite-serve' service
  service:
    name: kalite-serve
    enabled: no
    state: stopped
  when: not kalite_enabled

# Since Fedora 18 we don't have a separate unit file for kalite-cron

- name: Disable kalite cron server F18
  service:
    name: kalite-cron
    enabled: no
    state: stopped
  when: not kalite_cron_enabled and is_F18

- name: Enable kalite cron server F18
  service:
    name: kalite-cron
    enabled: yes
    state: started
  when: kalite_cron_enabled and is_F18
