diff --git a/roles/homarr/defaults/main.yml b/roles/homarr/defaults/main.yml index 2afb9f9..a371bdf 100644 --- a/roles/homarr/defaults/main.yml +++ b/roles/homarr/defaults/main.yml @@ -23,8 +23,7 @@ homarr_use_docker: false # Generate with: openssl rand -hex 32 # Provide via OpenBao lookup, Ansible Vault, or extra-vars. # Never commit a real key to version control. -#homarr_secret_encryption_key: "" -homarr_secret_encryption_key: "4fc2f54f54be3f4439b728da81b743fb0ee6317fd1a24f4096611f68019fa5a7" +homarr_secret_encryption_key: "9981080f7eb054b90c7be80622608c3b63ba58408171ef3fbcdce9ba9c0554dc" # URL — used for BASE_URL, NEXTAUTH_URL and the completion message homarr_base_url: "https://home.local.test" diff --git a/roles/homarr/tasks/main.yml b/roles/homarr/tasks/main.yml index b292408..d3e9d75 100644 --- a/roles/homarr/tasks/main.yml +++ b/roles/homarr/tasks/main.yml @@ -10,7 +10,7 @@ ansible.builtin.assert: that: - homarr_secret_encryption_key | length == 64 - - homarr_secret_encryption_key is match('^[a-f0-9]+$') + - homarr_secret_encryption_key is match('^[a-fA-F0-9]+$') fail_msg: >- homarr_secret_encryption_key must be a 64-character hex string. Generate with: openssl rand -hex 32 diff --git a/roles/homarr/templates/docker-compose.yml.j2 b/roles/homarr/templates/docker-compose.yml.j2 index 96c203d..2d81063 100644 --- a/roles/homarr/templates/docker-compose.yml.j2 +++ b/roles/homarr/templates/docker-compose.yml.j2 @@ -2,8 +2,8 @@ # Homarr — A simple, yet powerful dashboard for your server. # #---------------------------------------------------------------------# services: - {{ homarr_service_name }}: - container_name: {{ homarr_service_name }} + homarr: + container_name: homarr image: {{ homarr_image }} restart: unless-stopped volumes: @@ -29,14 +29,14 @@ services: labels: - traefik.enable=true - traefik.docker.network={{ homarr_traefik_network }} - - traefik.http.routers.{{ homarr_service_name }}.rule=Host(`{{ homarr_domain }}`) + - traefik.http.routers.homarr.rule=Host(`{{ homarr_domain }}`) {% if homarr_use_ssl %} - - traefik.http.routers.{{ homarr_service_name }}.entrypoints=websecure - - traefik.http.routers.{{ homarr_service_name }}.tls=true + - traefik.http.routers.homarr.entrypoints=websecure + - traefik.http.routers.homarr.tls=true {% else %} - - traefik.http.routers.{{ homarr_service_name }}.entrypoints=web + - traefik.http.routers.homarr.entrypoints=web {% endif %} - - traefik.http.services.{{ homarr_service_name }}.loadbalancer.server.port={{ homarr_port }} + - traefik.http.services.homarr.loadbalancer.server.port={{ homarr_port }} networks: {{ homarr_traefik_network }}: external: true \ No newline at end of file