nusenu/ansible-relayor

Key generation breaks on Whonix Workstation 16 (Control Machine)

jcoscia opened this issue · 2 comments

Describe the bug
When the playbook is run on Whonix Workstation 16, the Ensure all relay keys exist (LOCAL) task stalls forever.

This is likely because /usr/bin/tor and /usr/sbin/tor are symlinked to a shell script that sleeps forever. The actual tor lives at /usr/bin/tor.anondist-orig This is a Whonix quirk more than a Relayor bug, but it would be nice to automatically detect this and use the correct tor.

Relayor works as expected when /usr/bin/tor is replaced with the tor binary.

To Reproduce
Use Whonix Workstation 16 as a control machine, and run a valid playbook to deploy a new relay.

Expected behavior
Relayor generates keys for a new relay, and continues running the playbook.

Version information (please include the following information):

  • ansible version 2.10.8
  • ansible-relayor version 22.1.0-rc

Playbook information

  • hosts: relays
    vars:
    tor_ContactInfo: "foo@example.com"
    tor_signingkeylifetime_days: 4
    tor_nickname: "example"
    tor_AbuseEmailAddress: "foo@example.com"
    tor_ExitRelay: True
    tor_ExitPolicy:
    - accept *:119
    - accept *:135-139
    - accept *:445
    - reject *:25
    - accept :
    tor_ports:
    - { orport: 9001, dirport: 80}
    roles:
    • nusenu.relayor

OS information
Target: Debian 11
Control Machine: Whonix Workstation 16 (based on Debian 11.2)

Debug information

[snipped]

TASK [nusenu.relayor : Ensure all relay keys exist (LOCAL)] ********************
task path: /home/user/ansible/roles/nusenu.relayor/tasks/configure.yml:16
Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py
Pipelining is enabled.
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: user
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 && sleep 0'

It works correctly with the new tor_binary var set, thank you!