2021-01-12 17:18:05 +00:00
|
|
|
---
|
2018-11-25 01:58:11 +00:00
|
|
|
- name: Get docker group id
|
|
|
|
group:
|
|
|
|
name: docker
|
|
|
|
register: docker_group
|
|
|
|
|
|
|
|
- name: Netdata Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: netdata
|
2021-01-19 17:18:12 +00:00
|
|
|
hostname: "{{ ansible_nas_hostname }}.{{ ansible_nas_domain }}"
|
2018-11-25 01:58:11 +00:00
|
|
|
image: netdata/netdata
|
|
|
|
state: started
|
|
|
|
pull: true
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ netdata_port }}:19999"
|
2018-11-25 01:58:11 +00:00
|
|
|
volumes:
|
|
|
|
- "/proc:/host/proc:ro"
|
|
|
|
- "/sys:/host/sys:ro"
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
|
|
env:
|
|
|
|
PGID: "{{ docker_group.gid }}"
|
|
|
|
capabilities:
|
|
|
|
- SYS_PTRACE
|
|
|
|
security_opts:
|
|
|
|
- apparmor:unconfined
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
memory: 1g
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ netdata_available_externally }}"
|
2021-01-19 17:18:12 +00:00
|
|
|
traefik.http.routers.netdata.rule: "Host(`{{ netdata_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.netdata.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.netdata.loadbalancer.server.port: "19999"
|