2021-02-21 19:50:07 +00:00
|
|
|
---
|
2021-02-07 06:27:34 +00:00
|
|
|
- name: Create Glances Docker Container
|
2017-08-28 15:31:54 +00:00
|
|
|
docker_container:
|
|
|
|
name: glances
|
|
|
|
image: nicolargo/glances
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
2018-04-08 22:29:25 +00:00
|
|
|
pid_mode: host
|
2021-02-07 06:27:34 +00:00
|
|
|
ports:
|
|
|
|
- "{{ glances_port_one }}:61208"
|
|
|
|
- "{{ glances_port_two }}:61209"
|
2017-08-28 15:31:54 +00:00
|
|
|
env:
|
|
|
|
GLANCES_OPT: "-w"
|
|
|
|
restart_policy: unless-stopped
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ glances_available_externally }}"
|
2021-02-07 06:27:34 +00:00
|
|
|
traefik.http.routers.glances.rule: "Host(`{{ glances_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
traefik.http.routers.glances.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.glances.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.glances.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
2021-02-21 19:50:07 +00:00
|
|
|
traefik.http.services.glances.loadbalancer.server.port: "61208"
|