ansible-playbook.yml 1002 B

1234567891011121314151617181920212223242526272829303132
  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. # object 4b36399ceca223c76549c08dd482de4ef6b8e3a0
  11. # tag docker/1.0.0-tor0.4.3.5-obfs4proxy0.0.11-amd64
  12. image: docker.io/fphammerle/tor-obfs4-bridge@sha256:88224efd53e6aa7a357a683537321e788bca3387ccff743075c00a225a1273de
  13. env:
  14. OR_PORT: '{{ or_port }}'
  15. PT_PORT: '{{ pt_port }}'
  16. CONTACT_INFO: '{{ contact_info }}'
  17. volumes:
  18. - tor_obfs4_bridge_data:/var/lib/tor
  19. mounts:
  20. - type: tmpfs
  21. target: /tmp # torrc
  22. # nosuid,nodev,noexec added by default
  23. tmpfs_mode: '1777'
  24. tmpfs_size: 4k
  25. read_only: yes
  26. ports:
  27. - '{{ or_port }}:{{ or_port }}'
  28. - '{{ pt_port }}:{{ pt_port }}'
  29. cap_drop: [ALL]
  30. security_opts: [no-new-privileges]
  31. memory: 256M
  32. restart_policy: unless-stopped