mv glances to role

This commit is contained in:
PurpleNinja225 2021-02-06 21:27:34 -09:00
parent 3645e1ac29
commit eeca37693c
4 changed files with 21 additions and 19 deletions

View file

@ -37,7 +37,6 @@ mymediaforalexa_enabled: false
miniflux_enabled: false
# System Management
glances_enabled: false
stats_enabled: false
guacamole_enabled: false
cloudcmd_enabled: false
@ -358,13 +357,6 @@ gitlab_port_http: "4080"
gitlab_port_https: "4443"
gitlab_port_ssh: "422"
###
### Glances
###
glances_available_externally: "false"
glances_port_one: "61208"
glances_port_two: "61209"
###
### nginx
###

View file

@ -88,6 +88,11 @@
- gitea
when: (gitea_enabled | default(False))
- role: glances
tags:
- glances
when: (glances_enabled | default(False))
- role: heimdall
tags:
- heimdall
@ -215,10 +220,6 @@
when: (thelounge_enabled | default(False))
tags: thelounge
- import_tasks: tasks/glances.yml
when: (glances_enabled | default(False))
tags: glances
- import_tasks: tasks/znc.yml
when: (znc_enabled | default(False))
tags: znc

View file

@ -0,0 +1,9 @@
---
# enable or disable the application
glances_enabled: false
glances_available_externally: "false"
# network
glances_hostname: "glances"
glances_port_one: "61208"
glances_port_two: "61209"

View file

@ -1,24 +1,24 @@
- name: Glances Docker Container
---
- name: Create Glances Docker Container
docker_container:
name: glances
image: nicolargo/glances
pull: true
ports:
- "{{ glances_port_one }}:61208"
- "{{ glances_port_two }}:61209"
volumes:
#- "/glances.conf:/glances/conf/glances.conf"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/etc/timezone:/etc/timezone:ro"
pid_mode: host
ports:
- "{{ glances_port_one }}:61208"
- "{{ glances_port_two }}:61209"
env:
GLANCES_OPT: "-w"
restart_policy: unless-stopped
memory: 1g
labels:
traefik.enable: "{{ glances_available_externally }}"
traefik.http.routers.glances.rule: "Host(`glances.{{ ansible_nas_domain }}`)"
traefik.http.routers.glances.rule: "Host(`{{ glances_hostname }}.{{ ansible_nas_domain }}`)"
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 }}"
traefik.http.services.glances.loadbalancer.server.port: "61208"
traefik.http.services.glances.loadbalancer.server.port: "61208"