remove docker networks: ignore_errors (#598)

Reviewed-on: #598
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2023-11-10 11:50:08 +01:00 committed by mg
parent b951001484
commit 5a76e15608
3 changed files with 7 additions and 5 deletions

View File

@ -40,10 +40,10 @@ services:
restart: unless-stopped
network_mode: none
depends_on:
- nextcloud-app
- nextcloud-app
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/localtime:/etc/localtime:ro
environment:
NEXTCLOUD_CONTAINER_NAME: nextcloud-app
NEXTCLOUD_CRON_MINUTE_INTERVAL: 1

View File

@ -59,7 +59,7 @@ services:
# Uncomment and edit the following line to set a specific user / group id (native):
user: "5000:5000"
volumes:
- "/mnt/fileserver3_photoprism_bilder_ro:/photoprism/originals/:ro"
- /mnt/fileserver3_photoprism_bilder_ro:/photoprism/originals/:ro
- "storage:/photoprism/storage"
labels:
com.centurylinklabs.watchtower.enable: true

View File

@ -48,7 +48,9 @@
ansible.builtin.command: "docker network create {{ item.network }}" # erstelle network
register: network_result # speichere ergebnis in var
changed_when: "network_result.rc == 0" # markiere tasks als changed when exit-code == 0
ignore_errors: true # ignoriere fehler
failed_when:
- "not 'Error response from daemon: network with name' in network_result.stderr"
- "not network_result.rc == 0"
loop: "{{ compose_files }}"
when:
- item.state == "present"