Correction version traefik, correction d'un defaut d'ordre des étapes d'installation, ajout d'un parametre listen_ip pour traefik

This commit is contained in:
Navas 2024-01-13 20:09:30 +01:00
parent f23db03ca4
commit 2eba7055d2
3 changed files with 10 additions and 9 deletions

View file

@ -2,3 +2,4 @@ docker_host_data_dir: /data1/docker
docker_host_traefik_enabled: true docker_host_traefik_enabled: true
docker_host_traefik_trusted_ips: [] docker_host_traefik_trusted_ips: []
docker_host_user_namespaces: true docker_host_user_namespaces: true
docker_host_traefik_listen_ip: "0.0.0.0"

View file

@ -53,11 +53,6 @@
tags: configure tags: configure
meta: flush_handlers meta: flush_handlers
- name: configure - REBOOT IMMEDIAT pour prise en compte namespaces, relancer le playbook s'il ne poursuit pas tout seul
tags: configure
reboot:
when: grub_config.changed
- name: configure - sysctl user_namespaces - name: configure - sysctl user_namespaces
tags: configure tags: configure
sysctl: name=user.max_user_namespaces value=15076 sysctl_set=yes state=present reload=yes sysctl: name=user.max_user_namespaces value=15076 sysctl_set=yes state=present reload=yes
@ -70,6 +65,11 @@
notify: notify:
- restart docker - restart docker
- name: configure - REBOOT IMMEDIAT pour prise en compte configuration, relancer le playbook s'il ne poursuit pas tout seul
tags: configure
reboot:
when: grub_config.changed
- name: configure - active docker - name: configure - active docker
tags: configure tags: configure
service: service:

View file

@ -8,7 +8,7 @@ networks:
services: services:
traefik: traefik:
image: traefik:rocamadour image: traefik:v2.11
restart: always restart: always
command: command:
- "--log.level=INFO" - "--log.level=INFO"
@ -34,9 +34,9 @@ services:
- "traefik.http.routers.api.tls" - "traefik.http.routers.api.tls"
- "traefik.http.middlewares.auth.basicauth.users={{ docker_host_traefik_admin }}" - "traefik.http.middlewares.auth.basicauth.users={{ docker_host_traefik_admin }}"
ports: ports:
- "0.0.0.0:80:80" - "{{ docker_host_traefik_listen_ip }}:80:80"
- "0.0.0.0:443:443" - "{{ docker_host_traefik_listen_ip }}:443:443"
- "0.0.0.0:8443:8443" - "{{ docker_host_traefik_listen_ip }}:8443:8443"
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
environment: environment: