Add boolean to disable a server

This commit is contained in:
2020-12-29 08:23:06 -06:00
parent d884471153
commit 297f5373ca
3 changed files with 6 additions and 0 deletions

View File

@@ -85,3 +85,7 @@
when: minecraft_forge_install and minecraft_forge_version is defined
- name: enable service
systemd: name=minecraft@{{ minecraft_name }}.service enabled=yes state=started
when: minecraft_enabled
- name: disable service
systemd: name=minecraft@{{ minecraft_name }}.service enabled=no state=stopped
when: not minecraft_enabled