# enable or disable
- name: Enable & Restart 'minetest-server' service
  systemd:
    daemon_reload: yes
    name: minetest-server
    enabled: yes
    state: restarted
  when: minetest_enabled

- name: Disable & Stop 'minetest-server' service
  systemd:
    daemon_reload: yes
    name: minetest-server
    enabled: no
    state: stopped
  when: not minetest_enabled
