Commit 315597fe authored by Lars Beckers's avatar Lars Beckers
Browse files

mrtg: fix ansible-lint issues

parent 69de5f5f
......@@ -36,7 +36,7 @@
- name: create the config # noqa 301
# yamllint disable-line rule:line-length
command: "cfgmaker --output /etc/mrtg.cfg {% for switch in mrtg_switches %} --ifdesc=alias {{switch['community']}}@{{switch['router']}}:::::2 {% endfor %}"
command: "cfgmaker --output /etc/mrtg.cfg {% for switch in mrtg_switches %} --ifdesc=alias {{ switch['community'] }}@{{ switch['router'] }}:::::2 {% endfor %}"
tags: mrtg
- name: ensure the mrtg user can read the mrtg config file
......@@ -47,7 +47,7 @@
- name: ensure the mrtg user can read and write directories
file:
path: "{{item}}"
path: "{{ item }}"
state: directory
owner: mrtg
group: mrtg
......@@ -70,15 +70,15 @@
- name: create an index HTML page # noqa 301
# yamllint disable-line rule:line-length
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"
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: true
become_user: mrtg
tags: mrtg
- name: create separate index HTML pages # noqa 301
# yamllint disable-line rule:line-length
command: "indexmaker --output /var/www/mrtg/index-{{item['router']}}.html --title {{item['router']}}.{{domain}} --filter name=~{{item['router']}}_[0-9]+ --columns=3 --pagetop='<a href=\"index.html\">back</a>' /etc/mrtg.cfg"
with_items: "{{mrtg_switches}}"
command: "indexmaker --output /var/www/mrtg/index-{{ item['router'] }}.html --title {{ item['router'] }}.{{ domain }} --filter name=~{{ item['router'] }}_[0-9]+ --columns=3 --pagetop='<a href=\"index.html\">back</a>' /etc/mrtg.cfg"
with_items: "{{ mrtg_switches }}"
become: true
become_user: mrtg
tags: mrtg
......
......@@ -27,6 +27,7 @@
- name: get the weathermap package
get_url:
# TODO check for updated versions
# yamllint disable-line rule:line-length
url: https://github.com/howardjones/network-weathermap/releases/download/version-0.98/php-weathermap-0.98.zip
dest: /opt/weathermap.zip
......@@ -60,15 +61,16 @@
- name: get the weathermap colorscale
get_url:
dest: /root/colorscale.pal
# TODO use specific commit/tag instead of master
# yamllint disable-line rule:line-length
url: "https://raw.githubusercontent.com/Gnuplotting/gnuplot-palettes/master/{{weathermap_colorscale}}.pal"
checksum: "{{weathermap_colorscale_hash}}"
url: "https://raw.githubusercontent.com/Gnuplotting/gnuplot-palettes/master/{{ weathermap_colorscale }}.pal"
checksum: "{{ weathermap_colorscale_hash }}"
when: weathermap_colorscale is not none
tags: weathermap
- name: create the weathermap config
# yamllint disable-line rule:line-length
script: "makeweather.py {{weathermap_placement_strategy}} --colorscale /root/colorscale.pal"
script: "makeweather.py {{ weathermap_placement_strategy }} --colorscale /root/colorscale.pal"
tags: weathermap
- name: upload the weathermap html file
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment