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_notifier_state: present
|
||||
|
||||
minecraft_config:
|
||||
white-list: true
|
||||
enforce-whitelist: true
|
||||
server-port: 25565
|
||||
|
@ -1,5 +1,3 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% for k, v in minecraft_config.items() | default({}) %}
|
||||
{{ k }}: {{ v }}
|
||||
{% endfor %}
|
||||
white-list: {{ (minecraft_config.whitelist | default(true)) | ternary('true', 'false') }}
|
||||
enforce-whitelist: {{ (minecaft_config.enfoce_whitelist | default(true)) | ternary('true', 'false') }}
|
||||
server-port: {{ item.port | default(25565) }}
|
||||
|
@ -65,8 +65,6 @@ if [ -z "${PATHS+x}" ]; then
|
||||
error_exit "\$PATHS is not set"
|
||||
fi
|
||||
|
||||
START="$(date +%s)"
|
||||
|
||||
if [ -f "$LOCK" ]; then
|
||||
pid=$(cat "$LOCK")
|
||||
if ! kill -0 "$pid" 2> /dev/null; then
|
||||
@ -88,8 +86,6 @@ fi
|
||||
|
||||
echo $$ > "$LOCK"
|
||||
|
||||
LOCKED=$(($(date +%s) - START))
|
||||
|
||||
printf "job '%s' started\n" "$JOB"
|
||||
|
||||
if [ -d "${HOOKS_PATH}" ]; then
|
||||
@ -115,9 +111,7 @@ until [ $counter -eq "$MAX_ATTEMPTS" ] || [ $rc -eq 0 ]; do
|
||||
|
||||
rc=$?
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
break
|
||||
else
|
||||
if [ $rc -ne 0 ]; then
|
||||
sleep=$((counter * 5))
|
||||
printf "sleeping for %d seconds (%d)\n" $sleep $counter
|
||||
sleep $sleep
|
||||
@ -137,25 +131,3 @@ if [ -d "${HOOKS_PATH}" ]; then
|
||||
printf "running '%s' job post-hooks\n" "$JOB"
|
||||
run-parts --exit-on-error -v -a post "${HOOKS_PATH}"
|
||||
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"
|
||||
hour: "2"
|
||||
user: root
|
||||
job: >
|
||||
find /var/log/syslog/ -mindepth 4 -type f -name "*.log.xz" -mtime +90 -delete &&
|
||||
find /var/log/syslog/ -mindepth 3 -type d -empty -delete
|
||||
job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +90 -delete
|
||||
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"
|
||||
|
@ -28,7 +28,6 @@ util_packages:
|
||||
- traceroute
|
||||
- iperf
|
||||
- iperf3
|
||||
- smem
|
||||
math:
|
||||
- bc
|
||||
misc:
|
||||
@ -46,8 +45,6 @@ util_packages:
|
||||
- htop
|
||||
- iotop
|
||||
- iftop
|
||||
- atop
|
||||
- glances
|
||||
- lsof
|
||||
- sysdig
|
||||
- dstat
|
||||
@ -55,7 +52,6 @@ util_packages:
|
||||
- gnupg
|
||||
- pass
|
||||
- pwgen
|
||||
- apache2-utils
|
||||
text:
|
||||
- jq
|
||||
- crudini
|
||||
|
Loading…
Reference in New Issue
Block a user