diff --git a/roles/authentik/tasks/main.yml b/roles/authentik/tasks/main.yml index 728238b..c1c16c8 100644 --- a/roles/authentik/tasks/main.yml +++ b/roles/authentik/tasks/main.yml @@ -51,6 +51,7 @@ - /etc/letsencrypt/live/comfycamp.space/fullchain.pem:/certs/comfycamp.space/fullchain.pem:ro - /etc/letsencrypt/live/comfycamp.space/privkey.pem:/certs/comfycamp.space/privkey.pem:ro env_file: /etc/authentik/.env + restart_policy: unless-stopped loop: ["1", "2"] - name: Run authentik worker container become: true @@ -67,6 +68,7 @@ - authentik-templates:/templates - authentik-certs:/certs env_file: /etc/authentik/.env + restart_policy: unless-stopped - name: Run authentik LDAP outpost become: true community.docker.docker_container: @@ -82,4 +84,5 @@ env: AUTHENTIK_HOST: http://authentik-{{ item }}:9000 AUTHENTIK_TOKEN: "{{ ldap_outpost_token }}" + restart_policy: unless-stopped loop: ["1", "2"] diff --git a/roles/coturn/tasks/main.yml b/roles/coturn/tasks/main.yml index 46e889b..29590a4 100644 --- a/roles/coturn/tasks/main.yml +++ b/roles/coturn/tasks/main.yml @@ -23,10 +23,10 @@ image: coturn/coturn:4.6.2-bookworm command: ["-c", "/etc/coturn/server.conf"] network_mode: host - restart_policy: unless-stopped volumes: - /etc/coturn:/etc/coturn:ro mounts: - type: tmpfs target: /var/lib/coturn recreate: "{{ turnconf.changed }}" + restart_policy: unless-stopped diff --git a/roles/forgejo/tasks/main.yml b/roles/forgejo/tasks/main.yml index 69296ce..231311f 100644 --- a/roles/forgejo/tasks/main.yml +++ b/roles/forgejo/tasks/main.yml @@ -45,5 +45,5 @@ - /etc/localtime:/etc/localtime:ro ports: - "8022:8022" - restart_policy: unless-stopped recreate: "{{ appini.changed }}" + restart_policy: unless-stopped diff --git a/roles/immich/tasks/main.yml b/roles/immich/tasks/main.yml index e89e890..4522f92 100644 --- a/roles/immich/tasks/main.yml +++ b/roles/immich/tasks/main.yml @@ -48,6 +48,7 @@ - name: immich - name: postgresql recreate: "{{ cfg.changed }}" + restart_policy: unless-stopped - name: Start immich machine learning container become: true community.docker.docker_container: @@ -63,3 +64,4 @@ - name: immich - name: postgresql recreate: "{{ cfg.changed }}" + restart_policy: unless-stopped diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 4913037..e0ebfac 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -32,6 +32,7 @@ - /etc/letsencrypt/live/{{ domain }}/fullchain.pem:/etc/tls/fullchain.pem:ro - /etc/letsencrypt/live/{{ domain }}/privkey.pem:/etc/tls/privkey.pem:ro recreate: "{{ maddy_conf.changed }}" + restart_policy: unless-stopped - name: Get users become: true community.docker.docker_container_exec: diff --git a/roles/monitoring/tasks/postgresql.yml b/roles/monitoring/tasks/postgresql.yml index 9376714..08e48b6 100644 --- a/roles/monitoring/tasks/postgresql.yml +++ b/roles/monitoring/tasks/postgresql.yml @@ -11,3 +11,4 @@ DATA_SOURCE_URI: postgresql:5432/exporter?sslmode=disable DATA_SOURCE_USER: exporter DATA_SOURCE_PASS: "{{ postgresql_exporter_password }}" + restart_policy: unless-stopped diff --git a/roles/monitoring/tasks/prometheus.yml b/roles/monitoring/tasks/prometheus.yml index e6204bc..e6a7a43 100644 --- a/roles/monitoring/tasks/prometheus.yml +++ b/roles/monitoring/tasks/prometheus.yml @@ -31,3 +31,4 @@ - prometheus:/prometheus - /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro recreate: "{{ prometheus_cfg.changed }}" + restart_policy: unless-stopped diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index a660714..1efd100 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -33,6 +33,7 @@ - nextcloud:/var/www/html - /mnt/hdd/nextcloud/data:/var/www/html/data recreate: "{{ cfg.changed }}" + restart_policy: unless-stopped loop: [1] - name: Schedule background jobs become: true diff --git a/roles/postgresql/tasks/main.yml b/roles/postgresql/tasks/main.yml index 68fff2d..cbbbc1e 100644 --- a/roles/postgresql/tasks/main.yml +++ b/roles/postgresql/tasks/main.yml @@ -29,8 +29,8 @@ POSTGRES_USER: postgres POSTGRES_DB: postgres POSTGRES_PASSWORD: "{{ users.postgres }}" - restart_policy: unless-stopped recreate: "{{ pgconf.changed }}" + restart_policy: unless-stopped - name: Create a function to manage users become: true community.docker.docker_container_exec: diff --git a/roles/prosody/tasks/main.yml b/roles/prosody/tasks/main.yml index f1975d5..845c3fb 100644 --- a/roles/prosody/tasks/main.yml +++ b/roles/prosody/tasks/main.yml @@ -58,3 +58,4 @@ - "{{ tls_cert_path }}:/etc/tls/fullchain.pem:ro" - "{{ tls_key_path }}:/etc/tls/privkey.pem:ro" recreate: "{{ cfg.changed or tls_cert_state.changed or tls_key_state.changed }}" + restart_policy: unless-stopped diff --git a/roles/synapse/tasks/main.yml b/roles/synapse/tasks/main.yml index 6393743..5071563 100644 --- a/roles/synapse/tasks/main.yml +++ b/roles/synapse/tasks/main.yml @@ -46,5 +46,5 @@ networks: - name: postgresql - name: haproxy - restart_policy: unless-stopped recreate: "{{ serverconf.changed or logconf.changed }}" + restart_policy: unless-stopped diff --git a/roles/tor/tasks/main.yml b/roles/tor/tasks/main.yml index 6cab8ad..ee34e32 100644 --- a/roles/tor/tasks/main.yml +++ b/roles/tor/tasks/main.yml @@ -53,5 +53,5 @@ volumes: - /etc/tor:/etc/tor:ro - /var/lib/tor:/var/lib/tor - restart_policy: unless-stopped recreate: "{{ torrc.changed or tor_files.changed }}" + restart_policy: unless-stopped