Compare commits
No commits in common. "008779232b45091da6911e3989fb301da2939f1b" and "838d9b00dd52cba1a6de17dd67003cc69f427717" have entirely different histories.
008779232b
...
838d9b00dd
@ -20,8 +20,3 @@ minecraft_var_path: /var/opt/minecraft
|
|||||||
minecraft_syslog_facility: local5
|
minecraft_syslog_facility: local5
|
||||||
|
|
||||||
minecraft_notifier_state: present
|
minecraft_notifier_state: present
|
||||||
|
|
||||||
minecraft_config:
|
|
||||||
white-list: true
|
|
||||||
enforce-whitelist: true
|
|
||||||
server-port: 25565
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# {{ ansible_managed }}
|
white-list: {{ (minecraft_config.whitelist | default(true)) | ternary('true', 'false') }}
|
||||||
|
enforce-whitelist: {{ (minecaft_config.enfoce_whitelist | default(true)) | ternary('true', 'false') }}
|
||||||
{% for k, v in minecraft_config.items() | default({}) %}
|
server-port: {{ item.port | default(25565) }}
|
||||||
{{ k }}: {{ v }}
|
|
||||||
{% endfor %}
|
|
||||||
|
@ -65,8 +65,6 @@ if [ -z "${PATHS+x}" ]; then
|
|||||||
error_exit "\$PATHS is not set"
|
error_exit "\$PATHS is not set"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
START="$(date +%s)"
|
|
||||||
|
|
||||||
if [ -f "$LOCK" ]; then
|
if [ -f "$LOCK" ]; then
|
||||||
pid=$(cat "$LOCK")
|
pid=$(cat "$LOCK")
|
||||||
if ! kill -0 "$pid" 2> /dev/null; then
|
if ! kill -0 "$pid" 2> /dev/null; then
|
||||||
@ -88,8 +86,6 @@ fi
|
|||||||
|
|
||||||
echo $$ > "$LOCK"
|
echo $$ > "$LOCK"
|
||||||
|
|
||||||
LOCKED=$(($(date +%s) - START))
|
|
||||||
|
|
||||||
printf "job '%s' started\n" "$JOB"
|
printf "job '%s' started\n" "$JOB"
|
||||||
|
|
||||||
if [ -d "${HOOKS_PATH}" ]; then
|
if [ -d "${HOOKS_PATH}" ]; then
|
||||||
@ -115,12 +111,10 @@ until [ $counter -eq "$MAX_ATTEMPTS" ] || [ $rc -eq 0 ]; do
|
|||||||
|
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
if [ $rc -eq 0 ]; then
|
if [ $rc -ne 0 ]; then
|
||||||
break
|
sleep=$((counter * 5))
|
||||||
else
|
printf "sleeping for %d seconds (%d)\n" $sleep $counter
|
||||||
sleep=$((counter * 5))
|
sleep $sleep
|
||||||
printf "sleeping for %d seconds (%d)\n" $sleep $counter
|
|
||||||
sleep $sleep
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(( counter++ ))
|
(( counter++ ))
|
||||||
@ -137,25 +131,3 @@ if [ -d "${HOOKS_PATH}" ]; then
|
|||||||
printf "running '%s' job post-hooks\n" "$JOB"
|
printf "running '%s' job post-hooks\n" "$JOB"
|
||||||
run-parts --exit-on-error -v -a post "${HOOKS_PATH}"
|
run-parts --exit-on-error -v -a post "${HOOKS_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
END=$(date +%s)
|
|
||||||
|
|
||||||
if [ -d /var/spool/node_exporter/textfile_collector ]; then
|
|
||||||
cat << EOF > "/var/spool/node_exporter/textfile_collector/restic.prom.$$"
|
|
||||||
node_restic_duration_seconds{restic_job="${JOB}"} $((END - START))
|
|
||||||
node_restic_lock_duration_seconds{restic_job="${JOB}"} $LOCKED
|
|
||||||
node_restic_last_run_time{restic_job="${JOB}"} $END
|
|
||||||
node_restic_retries{restic_job="${JOB}"} $counter
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -f /var/spool/node_exporter/textfile_collector/restic.prom ]; then
|
|
||||||
cat /var/spool/node_exporter/textfile_collector/restic.prom "/var/spool/node_exporter/textfile_collector/restic.prom.$$" |
|
|
||||||
tac |
|
|
||||||
awk '!seen[$1]++' |
|
|
||||||
tac |
|
|
||||||
sponge "/var/spool/node_exporter/textfile_collector/restic.prom.$$"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mv "/var/spool/node_exporter/textfile_collector/restic.prom.$$" \
|
|
||||||
/var/spool/node_exporter/textfile_collector/restic.prom
|
|
||||||
fi
|
|
||||||
|
@ -77,7 +77,5 @@
|
|||||||
minute: "0"
|
minute: "0"
|
||||||
hour: "2"
|
hour: "2"
|
||||||
user: root
|
user: root
|
||||||
job: >
|
job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +90 -delete
|
||||||
find /var/log/syslog/ -mindepth 4 -type f -name "*.log.xz" -mtime +90 -delete &&
|
|
||||||
find /var/log/syslog/ -mindepth 3 -type d -empty -delete
|
|
||||||
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"
|
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"
|
||||||
|
@ -28,7 +28,6 @@ util_packages:
|
|||||||
- traceroute
|
- traceroute
|
||||||
- iperf
|
- iperf
|
||||||
- iperf3
|
- iperf3
|
||||||
- smem
|
|
||||||
math:
|
math:
|
||||||
- bc
|
- bc
|
||||||
misc:
|
misc:
|
||||||
@ -46,8 +45,6 @@ util_packages:
|
|||||||
- htop
|
- htop
|
||||||
- iotop
|
- iotop
|
||||||
- iftop
|
- iftop
|
||||||
- atop
|
|
||||||
- glances
|
|
||||||
- lsof
|
- lsof
|
||||||
- sysdig
|
- sysdig
|
||||||
- dstat
|
- dstat
|
||||||
@ -55,7 +52,6 @@ util_packages:
|
|||||||
- gnupg
|
- gnupg
|
||||||
- pass
|
- pass
|
||||||
- pwgen
|
- pwgen
|
||||||
- apache2-utils
|
|
||||||
text:
|
text:
|
||||||
- jq
|
- jq
|
||||||
- crudini
|
- crudini
|
||||||
|
Loading…
Reference in New Issue
Block a user