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

Silence mrtg warnings

parent 179e7e64
No related branches found
No related tags found
No related merge requests found
d /run/lock/mrtg 0755 mrtg mrtg - -
---
# file: shared-roles/network/mrtg/handlers/main.yml
- name: create tmpfiles
shell: systemd-tmpfiles --create
...@@ -27,6 +27,17 @@ ...@@ -27,6 +27,17 @@
file: path=/etc/mrtg.cfg group=mrtg file: path=/etc/mrtg.cfg group=mrtg
tags: mrtg tags: mrtg
- name: ensure the mrtg user can get the lock
copy:
src: tmpfiles.conf
dest: /etc/tmpfiles.d/10-mrtg.conf
owner: root
group: root
mode: 0644
notify:
- create tmpfiles
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.png\">Weathermap</a>{%endif %}' /etc/mrtg.cfg"
become: yes become: yes
......
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
dest: /opt/ dest: /opt/
tags: weathermap tags: weathermap
- name: silence the weathermap rrdtool warning
lineinfile:
path: /opt/weathermap/weathermap
regexp: '\$rrdtool=\"[^"]*\";'
line: '$rrdtool="/usr/sbin/nologin";'
tags: weathermap
- name: create the weathermap config - name: create the weathermap config
script: "makeweather.py {{weathermap_placement_strategy}}" script: "makeweather.py {{weathermap_placement_strategy}}"
tags: weathermap tags: weathermap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment