CT 114: Tor-Bootstrap-Check liest komplettes Journal, Debug robust gegen leere Ausgabe
-n 500 lieferte nach laengerem Betrieb keine Bootstrapped-Zeile mehr und '| last' brach auf leerer Liste. Jetzt unbegrenztes Journal + default-Filter. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
|
||||
- name: Read the Tor bootstrap status from the journal (tor@default)
|
||||
ansible.builtin.shell: |
|
||||
/usr/bin/journalctl -u tor@default.service --no-pager -n 500 --output=cat \
|
||||
/usr/bin/journalctl -u tor@default.service --no-pager --output=cat \
|
||||
| /usr/bin/grep -E 'Bootstrapped [0-9]+%' | tail -n 1
|
||||
args:
|
||||
executable: /bin/bash
|
||||
@@ -52,5 +52,5 @@
|
||||
|
||||
- name: Report the Tor bootstrap phase
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ litecoin_tor_bootstrap.stdout_lines | default(['check mode: skipped']) | last }}"
|
||||
msg: "{{ litecoin_tor_bootstrap.stdout_lines | default(['check mode: skipped']) | last | default('no bootstrap line in journal', true) }}"
|
||||
when: not ansible_check_mode
|
||||
|
||||
Reference in New Issue
Block a user