--- - name: Create archivebox volume become: true community.docker.docker_volume: name: archivebox - name: Create data dir become: true ansible.builtin.file: path: "{{ archive_dir }}" state: directory mode: "1700" owner: root - name: Create nested data dir become: true ansible.builtin.file: path: "{{ archive_dir }}/_data" state: directory mode: "1700" owner: "{{ uid | string }}" - name: Run archivebox become: true community.docker.docker_container: name: archivebox-1 image: archivebox/archivebox:{{ tag }} env: PUBLIC_INDEX: "{{ public_index | string }}" PUBLIC_SNAPSHOTS: "{{ public_snapshots | string }}" SAVE_ARCHIVE_DOT_ORG: "{{ save_archive_dot_org | string }}" CSRF_TRUSTED_ORIGINS: "{{ csrf_trusted_origins }}" ALLOWED_HOSTS: "{{ allowed_hosts }}" PUID: "{{ uid | string }}" PGID: "{{ gid | string }}" networks: - name: haproxy volumes: - "archivebox:/data" - "{{ archive_dir }}/_data:/data/archive" - "/etc/timezone:/etc/timezone:ro" restart_policy: unless-stopped