# vim: ft=yaml.ansible
---
- name: Deploy Tor Docker container
community.docker.docker_container:
name: tor
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: goldy/tor-hidden-service:{{ services.tor.version }}
restart_policy: always
env:
# Required by SimpleXMQ (we're not hosting anonymous services anyway)
TOR_EXTRA_OPTIONS: |
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
LINGVA_TOR_SERVICE_HOSTS: 80:lingva:3000
LINGVA_TOR_SERVICE_VERSION: '3'
LINGVA_TOR_SERVICE_KEY: "{{ secrets.tor.lingva_key }}"
SAMSAPTI_TOR_SERVICE_HOSTS: 80:samsapti:80
SAMSAPTI_TOR_SERVICE_VERSION: '3'
SAMSAPTI_TOR_SERVICE_KEY: "{{ secrets.tor.samsapti_key }}"
SEARXNG_TOR_SERVICE_HOSTS: 80:searxng:8080
SEARXNG_TOR_SERVICE_VERSION: '3'
SEARXNG_TOR_SERVICE_KEY: "{{ secrets.tor.searxng_key }}"
SIMPLEXMQ_TOR_SERVICE_HOSTS: 5223:simplexmq:5223
SIMPLEXMQ_TOR_SERVICE_VERSION: '3'
SIMPLEXMQ_TOR_SERVICE_KEY: "{{ secrets.tor.simplexmq_key }}"
networks:
- name: tor