Compare commits

...

2 Commits

Author SHA1 Message Date
4dd6380c0b
disable/enable minecraft instances 2020-01-26 15:18:17 -06:00
22dbc01a3c
gitea 1.10.2 2020-01-26 15:16:18 -06:00
3 changed files with 9 additions and 4 deletions

View File

@ -4,9 +4,9 @@ gitea_service_state: started
gitea_service_enabled: yes gitea_service_enabled: yes
gitea_arch: amd64 gitea_arch: amd64
gitea_version: 1.10.1 gitea_version: 1.10.2
gitea_url: "https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-{{ gitea_arch }}" gitea_url: "https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-{{ gitea_arch }}"
gitea_checksum: sha256:4e6bcb8fe9f4f5cc6f0e0c15a0dd67e9448a7ebd1592169862f0d4424a8f23ad gitea_checksum: sha256:e0479c0be2852357a84ac6b45b5de41ca5552c889cff385e6d57aa50a8f5a14c
gitea_bin_path: /usr/local/bin gitea_bin_path: /usr/local/bin
gitea_var_path: /var/lib/gitea gitea_var_path: /var/lib/gitea
gitea_log_path: /var/log/gitea gitea_log_path: /var/log/gitea

View File

@ -86,8 +86,8 @@
- name: manage minecraft service - name: manage minecraft service
service: service:
name: "minecraft@{{ item.name }}" name: "minecraft@{{ item.name }}"
state: "{{ minecraft_service_state }}" state: "{{ item.state | default(minecraft_service_state) }}"
enabled: "{{ minecraft_service_enabled }}" enabled: "{{ item.enabled | default(minecraft_service_enabled) }}"
loop: "{{ minecraft_worlds }}" loop: "{{ minecraft_worlds }}"
#- name: configure ops #- name: configure ops

View File

@ -47,6 +47,11 @@ start_server() {
local unit="${1:-$SERVICE}" local unit="${1:-$SERVICE}"
local attempts="${2:-$WAIT}" local attempts="${2:-$WAIT}"
if ! systemctl -q is-enabled "$unit"; then
printf "%s is not enabled, skipping.\n" "$unit"
return 0
fi
if systemctl -q is-active "$unit"; then if systemctl -q is-active "$unit"; then
printf "%s is already started\n" "$unit" printf "%s is already started\n" "$unit"
return 0 return 0