mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-27 03:53:06 +00:00
ce21999f46
NOTE: The majority of traefik ports were totally broken and would never have worked. It should be the external port there, not the internal container port!. Port conflicts were fixed.
32 lines
No EOL
859 B
YAML
32 lines
No EOL
859 B
YAML
###### Create
|
|
- name: Get docker group id
|
|
group:
|
|
name: docker
|
|
register: docker_group
|
|
|
|
- name: Netdata Docker Container
|
|
docker_container:
|
|
name: netdata
|
|
hostname: "{{ ansible_nas_hostname }}.{{ ansible_nas_domain }}"
|
|
image: netdata/netdata
|
|
state: started
|
|
pull: true
|
|
ports:
|
|
- "{{ netdata_port }}:19999"
|
|
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
|
|
labels:
|
|
traefik.backend: "netdata"
|
|
traefik.frontend.rule: "Host:netdata.{{ ansible_nas_domain }}"
|
|
traefik.enable: "{{ netdata_available_externally }}"
|
|
traefik.port: "{{ netdata_port }}" |