ansible-playbook.yml 819 B

1234567891011121314151617181920212223242526272829
  1. - hosts: [some-host]
  2. become: true
  3. vars:
  4. or_port: 42218 # random
  5. pt_port: 51804 # random
  6. contact_info: admin@optional.com
  7. tasks:
  8. - docker_container:
  9. name: tor_obfs4_bridge
  10. # TODO replace tag with fingerprint
  11. image: fphammerle/tor-obfs4-bridge:1.0.0-tor0.4.3.5-obfs4proxy0.0.11-amd64
  12. env:
  13. OR_PORT: '{{ or_port }}'
  14. PT_PORT: '{{ pt_port }}'
  15. CONTACT_INFO: '{{ contact_info }}'
  16. volumes:
  17. - tor_obfs4_bridge:/var/lib/tor
  18. mounts:
  19. - type: tmpfs
  20. target: /tmp # torrc
  21. # nosuid,nodev,noexec added by default
  22. tmpfs_mode: '1777'
  23. tmpfs_size: 4k
  24. read_only: yes
  25. ports:
  26. - '{{ or_port }}:{{ or_port }}'
  27. - '{{ pt_port }}:{{ pt_port }}'
  28. memory: 256M
  29. restart_policy: unless-stopped