diff --git a/host-holmium.yml b/host-holmium.yml index 405f67e..13aff54 100644 --- a/host-holmium.yml +++ b/host-holmium.yml @@ -29,6 +29,7 @@ - name: influx.n39.eu local: true - name: uptime.n39.eu + - name: grafana.n39.eu - server: radon hosts: - name: nodered.n39.eu diff --git a/host-pottwal.yml b/host-pottwal.yml index 45c9764..ae833e0 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -24,6 +24,7 @@ - name: redmine.n39.eu - name: influx.n39.eu - name: uptime.n39.eu + - name: "{{ grafana_domain_name }}" - role: penguineer.dehydrated_cron - role: dd24_dyndns_cron # variables are set in the inventory @@ -380,4 +381,38 @@ site_name: uptime.n39.eu proxy_port: "{{ uptimekuma_host_port }}" + - name: Ensure the grafana directories exist + file: + path: "{{ item.path }}" + owner: "{{ item.owner | default('root') }}" + mode: "{{ item.mode }}" + state: directory + with_items: + - path: "{{ data_dir }}/grafana" + mode: "0755" + - path: "{{ data_dir }}/grafana/data" + owner: 472 + mode: "0755" + + - name: Ensure container for grafana is running + docker_container: + name: grafana + image: "grafana/grafana" + ports: + - "127.0.0.1:{{ grafana_host_port }}:3000" + volumes: + - "{{ data_dir }}/grafana/data:/var/lib/grafana" + env: + TZ: "{{ timezone }}" + GF_SECURITY_ADMIN_PASSWORD: "{{ grafana_admin_password }}" + GF_USERS_ALLOW_SIGN_UP: "false" + GF_INSTALL_PLUGINS: "flant-statusmap-panel,ae3e-plotly-panel" + + - name: Setup proxy site grafana.n39.eu + include_role: + name: setup_http_site_proxy + vars: + site_name: "{{ grafana_domain_name }}" + proxy_port: "{{ grafana_host_port }}" + handlers: diff --git a/host_vars/pottwal.n39.eu/vars.yml b/host_vars/pottwal.n39.eu/vars.yml index 1c50bba..35a5522 100644 --- a/host_vars/pottwal.n39.eu/vars.yml +++ b/host_vars/pottwal.n39.eu/vars.yml @@ -34,3 +34,7 @@ prosody_domain_name: jabber.n39.eu jabber_host_port: 8086 uptimekuma_host_port: 8085 + +grafana_host_port: 8089 +grafana_domain_name: grafana.n39.eu +grafana_admin_password: "{{ vault_grafana_admin_password }}" \ No newline at end of file diff --git a/host_vars/pottwal.n39.eu/vault b/host_vars/pottwal.n39.eu/vault index 64fa060..422b1e7 100644 --- a/host_vars/pottwal.n39.eu/vault +++ b/host_vars/pottwal.n39.eu/vault @@ -1,18 +1,20 @@ $ANSIBLE_VAULT;1.1;AES256 -34613130633764366239396165376133363264316231303664373664366264623464643465343738 -3331616138303039616434633839383438336233633237340a303932343861333131306661323037 -33363561303461653461393530366135376138343962393037306530643639653062313461323564 -6363386239636333660a333065396531616564313839643936346362653564353430316531653163 -64643766653761643665626330653162636165626631623630316366613639363339303062623432 -39386631346265656262656437353032383362653866333935313961316131393664633339346134 -62323561653361306366313831643763336631326235343235623937386533363233623031386431 -62613537396566326164663862333032393431666662653534333331323835666131613239653664 -66626233633238373830393134656537373839623762653836616333373961623838356163323238 -36323235386233643536613766663039353331643139613333336266626262343138656433313163 -34313361316663616233373832393332373766373135396637646430383262613966303036313662 -63323535663133383839666463643036643463646262363737366366633630313662316436383737 -32323830633564663039313835633739346433316562643966613737323662623637386264326666 -66383564353738643963323530323139313136633062326366313863386433306439663433396333 -39316465333431636461306137346465623630313038346531383139333432656366393031613931 -39346664663838656439393039663566333466366336363636643532343031613730323838356436 -3635 +35323634353263613464653863633861303539636238333464653633653164353632306233626231 +3766386232326433383932636136313831346131336335360a383639643334613033336134373566 +36343465336365363732363931383031356532336235313537396338316465366537313032616261 +6634393966623662390a383335316661613332633165333936396335666637306163363133323363 +33613639306537396136643438623937363336376332353634333130313434623433303264393461 +38663337396465343937396438333261393463303866306234323138396563653837373334356239 +64653231633066656662306530656139316530316263356135363538303061646432353338323237 +66663161333133313762366261343434666238376537636433313461343065646565633130333061 +33376537316338666662643639623637396366336263656537326363663936616234343235373636 +33373039373033333533363366356435633863633434643963633664613238363961363733366437 +61353936613065303230616239646334313130636133653461663561303037383663643761376235 +33303661663063613635306438613738613064386466656430343130356131663262353239326334 +63323630333466356263646162336437646133616565353430313737313332363330663236383830 +33366138303665386561393136616238346335633163313330386434323239623736333562363862 +66636165373264353132626232633537613536303362366535653438303261323735666331363439 +61613939373333616364303134353437333965386239623933393932373434666234373736316166 +63373935356162326230653437643030313262373965353831396361646136663938336334646633 +65313166613131396665393363633166663137363564393063363330366364373936643831373030 +333465303435636163616236306264646666