- hosts: [some-host] become: true tasks: - docker_volume: name: onion_service_key - docker_container: name: onion_service # 0.2-tor0.3.3.7-amd64 image: fphammerle/onion-service@sha256:51b5ee67fea1587421fd3dd982cc58f7554b68fe051d316d6d120e560675d2b8 env: VIRTUAL_PORT: 80 TARGET: 1.2.3.4:8080 volumes: ['onion_service_key:/onion-service'] memory: 128M restart_policy: unless-stopped