diff --git a/containers/traefik/templates/conf/cockpit.yml.j2 b/containers/traefik/templates/conf/cockpit.yml.j2 index cd7fedd..893fe28 100644 --- a/containers/traefik/templates/conf/cockpit.yml.j2 +++ b/containers/traefik/templates/conf/cockpit.yml.j2 @@ -1,7 +1,7 @@ http: routers: cockpit: - rule: "Path(`/cockpit`)" + rule: "PathPrefix(`/cockpit`)" entryPoints: https service: cockpit tls: @@ -11,4 +11,4 @@ http: cockpit: loadBalancer: servers: - - url: "http://131.175.120.208:9090" + - url: "http://{{ ansible_host }}:9090" diff --git a/roles/cockpit/templates/cockpit.conf.j2 b/roles/cockpit/templates/cockpit.conf.j2 index 0173bd8..c42dc90 100644 --- a/roles/cockpit/templates/cockpit.conf.j2 +++ b/roles/cockpit/templates/cockpit.conf.j2 @@ -1,4 +1,4 @@ [WebService] -Origins = http://{{ inventory_hostname }} ws://{{ inventory_hostname }} https://{{ inventory_hostname }} wss://{{ inventory_hostname }} http://131.175.120.208 ws://131.175.120.208 https://131.175.120.208 wss://131.175.120.208 +Origins = http://{{ inventory_hostname }} ws://{{ inventory_hostname }} https://{{ inventory_hostname }} wss://{{ inventory_hostname }} http://{{ ansible_host }} ws://{{ ansible_host }} https://{{ ansible_host }} wss://{{ ansible_host }} ProtocolHeader = X-Forwarded-Proto AllowUnencrypted=true \ No newline at end of file