From 25f9362b8994f4fd4599b863ded5a7c3a393371f Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 15 Jan 2018 12:32:51 +0100 Subject: [PATCH] yanic: adjust config file to upstream changes --- roles/yanic/defaults/main.yml | 12 ++++++---- roles/yanic/templates/config.toml.j2 | 34 ++++++++++++++++------------ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/roles/yanic/defaults/main.yml b/roles/yanic/defaults/main.yml index f7084b9..53b3d48 100644 --- a/roles/yanic/defaults/main.yml +++ b/roles/yanic/defaults/main.yml @@ -15,6 +15,10 @@ yanic_nodes_save_interval: "5s" yanic_nodes_offline_after: "10m" yanic_nodes_prune_after: "7d" +yanic_meshviewer_ffrgb_enable: true +yanic_meshviewer_ffrgb_path: "/var/www/html/meshviewer/data/meshviewer.json" + +yanic_meshviewer_enable: true yanic_meshviewer_version: 2 yanic_meshviewer_path: "/var/www/html/meshviewer/data" yanic_meshviewer_nodes: "{{yanic_meshviewer_path}}/nodes.json" @@ -23,13 +27,13 @@ yanic_meshviewer_graph: "{{yanic_meshviewer_path}}/graph.json" yanic_database_delete_after: "7d" yanic_database_delete_interval: "1h" -yanic_socket: -- enable: false - type: unix - address: "/var/lib/yanic/database.socket" yanic_influxdb: - enable: false host: http://localhost:8086 database: ffhb username: "" password: "" +yanic_graphite: +- enable: false + address: "localhost:2003" + prefix: "freifunk" diff --git a/roles/yanic/templates/config.toml.j2 b/roles/yanic/templates/config.toml.j2 index 733a0dc..851aed1 100644 --- a/roles/yanic/templates/config.toml.j2 +++ b/roles/yanic/templates/config.toml.j2 @@ -2,7 +2,8 @@ [respondd] enable = {{ yanic_respondd | ternary('true','false') }} collect_interval = "{{ yanic_respondd_collect_interval }}" -interface = "{{ yanic_respondd_interface }}" +interfaces = ["{{ yanic_respondd_interface }}"] +sites = [] [webserver] enable = {{ yanic_webserver | ternary('true','false') }} @@ -10,17 +11,20 @@ bind = "{{ yanic_webserver_bind }}" webroot = "{{ yanic_webserver_webroot }}" [nodes] -enable = {{yanic_nodes | ternary('true','false') }} -state_path = "{{yanic_nodes_state_path}}" -save_interval = "{{yanic_nodes_save_interval}}" -offline_after = "{{yanic_nodes_offline_after}}" -prune_after = "{{yanic_nodes_prune_after}}" +state_path = "{{ yanic_nodes_state_path }}" +prune_after = "{{ yanic_nodes_prune_after }}" +save_interval = "{{ yanic_nodes_save_interval }}" +offline_after = "{{ yanic_nodes_offline_after }}" +[[nodes.output.meshviewer-ffrgb]] +enable = {{ yanic_meshviewer_ffrgb_enable | ternary('true','false') }} +path = "{{ yanic_meshviewer_ffrgb_path }}" -[meshviewer] -version = {{yanic_meshviewer_version}} -nodes_path = "{{yanic_meshviewer_nodes}}" -graph_path = "{{yanic_meshviewer_graph}}" +[[nodes.output.meshviewer]] +enable = {{ yanic_meshviewer_enable | ternary('true','false') }} +version = {{ yanic_meshviewer_version }} +nodes_path = "{{ yanic_meshviewer_nodes }}" +graph_path = "{{ yanic_meshviewer_graph }}" [database] delete_after = "{{ yanic_database_delete_after }}" @@ -35,9 +39,11 @@ username = "{{ db.username }}" password = "{{ db.password }}" {% endfor %} -{% for db in yanic_socket %} -[[database.connection.socket]] +[database.connection.influxdb.tags] + +{% for db in yanic_graphite %} +[[database.connection.graphite]] enable = {{ db.enable | ternary('true','false') }} -type = "{{ db.type }}" -address = "{{ db.address }}" +address = "{{ db.address }}" +prefix = "{{ db.prefix }}" {% endfor %}