Skip to content
Snippets Groups Projects
Commit a7dcb35b authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Add weathermap html page with auto refresh

parent c957eda7
Branches
No related tags found
No related merge requests found
<!doctype html>
<html>
<head>
<title>Weathermap</title>
<meta http-equiv="refresh" content="300" />
<meta charset="utf-8" />
</head>
<body>
<img src="weathermap.png">
</body>
</html>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
tags: mrtg tags: mrtg
- name: create an index HTML page - name: create an index HTML page
command: "indexmaker --output /var/www/mrtg/index.html --title='Traffic of {{domain}}' --columns=3 --pagetop='{% for switch in mrtg_switches %}<a href=\"index-{{switch['router']}}.html\"><b>{{switch['router']}}</b>.{{domain}}</a> {% endfor %} {% if use_weathermap %}<a href=\"weathermap.png\">Weathermap</a>{%endif %}' /etc/mrtg.cfg" command: "indexmaker --output /var/www/mrtg/index.html --title='Traffic of {{domain}}' --columns=3 --pagetop='{% for switch in mrtg_switches %}<a href=\"index-{{switch['router']}}.html\"><b>{{switch['router']}}</b>.{{domain}}</a> {% endfor %} {% if use_weathermap %}<a href=\"weathermap.html\">Weathermap</a>{%endif %}' /etc/mrtg.cfg"
become: yes become: yes
become_user: mrtg become_user: mrtg
tags: mrtg tags: mrtg
......
...@@ -61,6 +61,15 @@ ...@@ -61,6 +61,15 @@
script: "makeweather.py {{weathermap_placement_strategy}} --colorscale /root/colorscale.pal" script: "makeweather.py {{weathermap_placement_strategy}} --colorscale /root/colorscale.pal"
tags: weathermap tags: weathermap
- name: upload the weathermap html file
copy:
src: weathermap.html
dest: /var/www/mrtg/
owner: mrtg
group: www-data
mode: 0644
tags: weathermap
- name: create the weathermap regularly - name: create the weathermap regularly
cron: cron:
name: "create weathermap" name: "create weathermap"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment