CT 114: Tor-Bootstrap-Status aus dem Notice-Log statt torctl lesen
Debian 13 (trixie) shippt kein /usr/bin/torctl mehr; grep auf 'Bootstrapped …%' in /var/log/tor/notices.log stattdessen. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -38,13 +38,13 @@
|
||||
timeout: 120
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: Read the Tor bootstrap status
|
||||
- name: Read the Tor bootstrap status from the notice log
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- /usr/bin/torctl
|
||||
- --socket /run/tor/control
|
||||
- getinfo
|
||||
- status/bootstrap-phase
|
||||
- /usr/bin/grep
|
||||
- -E
|
||||
- Bootstrapped [0-9]+%?
|
||||
- "{{ litecoin_tor_log }}"
|
||||
check_mode: false
|
||||
changed_when: false
|
||||
register: litecoin_tor_bootstrap
|
||||
@@ -52,5 +52,5 @@
|
||||
|
||||
- name: Report the Tor bootstrap phase
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ litecoin_tor_bootstrap.stdout | default('check mode: skipped') }}"
|
||||
msg: "{{ litecoin_tor_bootstrap.stdout_lines | default(['check mode: skipped']) | last }}"
|
||||
when: not ansible_check_mode
|
||||
|
||||
Reference in New Issue
Block a user