From 3477a59405d6f97a86634d2d42a0edc8204607e4 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 26 Jul 2018 10:57:58 +0200 Subject: [PATCH] Cleanup (mostly whitespace and style) --- roles/batman/defaults/main.yml | 2 ++ roles/dns/tasks/main.yml | 20 +++++++++---------- roles/fastd/defaults/main.yml | 2 ++ roles/node_exporter/handlers/main.yml | 1 + roles/node_exporter/tasks/main.yml | 2 +- .../templates/node_exporter.service.j2 | 1 + roles/prometheus/handlers/main.yml | 1 + roles/prometheus/tasks/main.yml | 2 +- roles/radvd/tasks/main.yml | 13 +++--------- roles/respondd/tasks/main.yml | 2 +- roles/yanic/defaults/main.yml | 18 +++++++++-------- roles/yanic/handlers/main.yml | 1 + roles/yanic/tasks/main.yml | 10 +++++----- 13 files changed, 39 insertions(+), 36 deletions(-) diff --git a/roles/batman/defaults/main.yml b/roles/batman/defaults/main.yml index bc452f1..66c9bcf 100644 --- a/roles/batman/defaults/main.yml +++ b/roles/batman/defaults/main.yml @@ -1,2 +1,4 @@ +--- + batman-adv_version: 2017.3 batman-adv_tar_sha256_hash: 830edd297ff11b91623e9612172db3e2b2c1524e2f9b2ca1cb243e2e3f0ba4d4 diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml index 55f78fc..ca3adf6 100644 --- a/roles/dns/tasks/main.yml +++ b/roles/dns/tasks/main.yml @@ -3,9 +3,9 @@ - name: Install powerdns apt: name={{ item }} with_items: - - pdns-backend-bind - - pdns-recursor - - pdns-server + - pdns-backend-bind + - pdns-recursor + - pdns-server - name: Create zone directory file: path=/etc/powerdns/bind/ state=directory @@ -15,14 +15,14 @@ tags: dns notify: Restart powerdns with_items: - - bind/ffrgb.zone - - bind/90.10.in-addr.arpa.zone - - bindbackend.conf - - pdns.conf - - recursor.conf + - bind/ffrgb.zone + - bind/90.10.in-addr.arpa.zone + - bindbackend.conf + - pdns.conf + - recursor.conf - name: Start the powerdns services service: name={{ item }} state=started enabled=yes with_items: - - pdns - - pdns-recursor + - pdns + - pdns-recursor diff --git a/roles/fastd/defaults/main.yml b/roles/fastd/defaults/main.yml index dcaa3cc..8567e26 100644 --- a/roles/fastd/defaults/main.yml +++ b/roles/fastd/defaults/main.yml @@ -1,3 +1,5 @@ +--- + batman_interface: bat-{{ site_code }} fastd_anonymous: true diff --git a/roles/node_exporter/handlers/main.yml b/roles/node_exporter/handlers/main.yml index 3f36681..0364b35 100644 --- a/roles/node_exporter/handlers/main.yml +++ b/roles/node_exporter/handlers/main.yml @@ -1,4 +1,5 @@ --- + - name: Restart node_exporter service: name=node_exporter state=restarted diff --git a/roles/node_exporter/tasks/main.yml b/roles/node_exporter/tasks/main.yml index dba2cd2..14e17f5 100644 --- a/roles/node_exporter/tasks/main.yml +++ b/roles/node_exporter/tasks/main.yml @@ -16,4 +16,4 @@ - Restart node_exporter - name: Enable node_exporter - service: name=node_exporter enabled=yes + service: name=node_exporter state=started enabled=yes diff --git a/roles/node_exporter/templates/node_exporter.service.j2 b/roles/node_exporter/templates/node_exporter.service.j2 index 000d29b..6bf3ff6 100644 --- a/roles/node_exporter/templates/node_exporter.service.j2 +++ b/roles/node_exporter/templates/node_exporter.service.j2 @@ -2,6 +2,7 @@ Description=Node Exporter [Service] +Type=simple User=node_exporter EnvironmentFile=/etc/default/node_exporter ExecStart=/opt/node_exporter-{{ node_exporter_version }}.linux-amd64/node_exporter $OPTIONS diff --git a/roles/prometheus/handlers/main.yml b/roles/prometheus/handlers/main.yml index 961a5ce..38f4e38 100644 --- a/roles/prometheus/handlers/main.yml +++ b/roles/prometheus/handlers/main.yml @@ -1,3 +1,4 @@ --- + - name: Restart prometheus service: name=prometheus state=restarted diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index c28df74..1f866a7 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -11,4 +11,4 @@ notify: Restart prometheus - name: Enable prometheus - service: name=prometheus enabled=yes + service: name=prometheus state=started enabled=yes diff --git a/roles/radvd/tasks/main.yml b/roles/radvd/tasks/main.yml index b7d997f..4296b85 100644 --- a/roles/radvd/tasks/main.yml +++ b/roles/radvd/tasks/main.yml @@ -1,18 +1,11 @@ --- - name: Install radvd - apt: name={{ item }} - with_items: - - radvd + apt: name=radvd - name: Configure radvd - template: src={{ item }}.j2 dest=/etc/{{ item }} - tags: radvd + template: src=radvd.j2 dest=/etc/radvd notify: Restart radvd - with_items: - - radvd.conf - name: Start the radvd service - service: name={{ item }} state=started enabled=yes - with_items: - - radvd + service: name=radvd state=started enabled=yes diff --git a/roles/respondd/tasks/main.yml b/roles/respondd/tasks/main.yml index b535deb..2b31c57 100644 --- a/roles/respondd/tasks/main.yml +++ b/roles/respondd/tasks/main.yml @@ -14,4 +14,4 @@ - Restart respondd - name: Enable respondd - service: name=respondd enabled=yes + service: name=respondd state=started enabled=yes diff --git a/roles/yanic/defaults/main.yml b/roles/yanic/defaults/main.yml index 2bd72d0..6d1e69a 100644 --- a/roles/yanic/defaults/main.yml +++ b/roles/yanic/defaults/main.yml @@ -1,10 +1,12 @@ --- +yanic_source: github.com/ffrgb/yanic + yanic_publisher: false yanic_respondd: true -yanic_respondd_collect_interval: "1m" -yanic_respondd_synchronize_interval: "1m" -yanic_respondd_interface: "br-{{ site_code }}" +yanic_respondd_collect_interval: 1m +yanic_respondd_synchronize_interval: 1m +yanic_respondd_interface: br-{{ site_code }} yanic_webserver: false yanic_webserver_bind: "127.0.0.1:8080" @@ -12,9 +14,9 @@ yanic_webserver_webroot: "/var/www/html/meshviewer" yanic_nodes: true yanic_nodes_state_path: "/var/lib/yanic/yanic.json" -yanic_nodes_save_interval: "5s" -yanic_nodes_offline_after: "10m" -yanic_nodes_prune_after: "7d" +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" @@ -25,8 +27,8 @@ yanic_meshviewer_path: "/var/www/html/meshviewer/data" yanic_meshviewer_nodes: "{{yanic_meshviewer_path}}/nodes.json" yanic_meshviewer_graph: "{{yanic_meshviewer_path}}/graph.json" -yanic_database_delete_after: "7d" -yanic_database_delete_interval: "1h" +yanic_database_delete_after: 7d +yanic_database_delete_interval: 1h yanic_repondd_enable: true yanic_repondd_remotehost: "[2a01:4f8:173:2919::2]:10001" diff --git a/roles/yanic/handlers/main.yml b/roles/yanic/handlers/main.yml index ea84862..31a3d13 100644 --- a/roles/yanic/handlers/main.yml +++ b/roles/yanic/handlers/main.yml @@ -1,4 +1,5 @@ --- + - name: Restart yanic service: name=yanic state=restarted diff --git a/roles/yanic/tasks/main.yml b/roles/yanic/tasks/main.yml index 63472f7..4abd253 100644 --- a/roles/yanic/tasks/main.yml +++ b/roles/yanic/tasks/main.yml @@ -4,7 +4,7 @@ user: name=yanic - name: Install yanic - shell: /usr/local/go/bin/go get -v -u github.com/ffrgb/yanic + shell: /usr/local/go/bin/go get -v -u {{ yanic_source }} args: creates: /opt/go/bin/yanic environment: @@ -18,14 +18,14 @@ - name: Create directories file: path={{ item }}/ state=directory owner=yanic with_items: - - "{{ yanic_meshviewer_path }}" - - /var/lib/yanic + - "{{ yanic_meshviewer_path }}" + - /var/lib/yanic - name: Install systemd unit copy: src=yanic.service dest=/lib/systemd/system/yanic.service notify: - - Reload systemd - - Restart yanic + - Reload systemd + - Restart yanic - name: Enable yanic service: name=yanic enabled=yes