Add service install, enable by default

This commit is contained in:
Salt 2020-02-24 00:18:41 -06:00
parent eb5c6a62b0
commit a206c16f43
2 changed files with 9 additions and 0 deletions

View File

@ -35,3 +35,6 @@ ExecStop=/bin/sleep 10
Restart=on-failure
RestartSec=60s
[Install]
WantedBy=multi-user.target

View File

@ -93,3 +93,9 @@
when: not stat_mcroot_forgejar.stat.exists
become: yes
become_user: minecraft
- name: Enable service
systemd:
name: "minecraft@{{ mcname }}"
enabled: yes
state: started
become: yes