From 1738af3a5dd29c89e27e33a890389b5ac4b71843 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Mon, 23 Sep 2019 22:56:20 +0200 Subject: install mesh-announce --- roles/install_mesh-announce/tasks/main.yml | 24 ++++++++++++++++++++++ .../templates/respondd.service.j2 | 12 +++++++++++ 2 files changed, 36 insertions(+) create mode 100644 roles/install_mesh-announce/tasks/main.yml create mode 100644 roles/install_mesh-announce/templates/respondd.service.j2 (limited to 'roles/install_mesh-announce') diff --git a/roles/install_mesh-announce/tasks/main.yml b/roles/install_mesh-announce/tasks/main.yml new file mode 100644 index 0000000..ea81a45 --- /dev/null +++ b/roles/install_mesh-announce/tasks/main.yml @@ -0,0 +1,24 @@ +--- +- name: clone mesh-announce repo + git: + repo: https://github.com/FreifunkMYK/mesh-announce.git + dest: /opt/mesh-announce + +- name: install mesh-announce dependencies + pacman: + name: + - lsb-release + - ethtool + state: present + +- name: create respondd service + template: + src: respondd.service.j2 + dest: /etc/systemd/system/respondd.service + mode: 0644 + +- name: start and enable respondd service + systemd: + name: respondd + state: started + enabled: yes diff --git a/roles/install_mesh-announce/templates/respondd.service.j2 b/roles/install_mesh-announce/templates/respondd.service.j2 new file mode 100644 index 0000000..53970a7 --- /dev/null +++ b/roles/install_mesh-announce/templates/respondd.service.j2 @@ -0,0 +1,12 @@ +[Unit] +Description=Respondd +After=network.target + +[Service] +ExecStart=/opt/mesh-announce/respondd.py -d /opt/mesh-announce/providers {% for site in sites %}-i bat{{ site.name }} -i vpn{{ site.name }} -b bat{{ site.name }} {% endfor %} + +Restart=always +Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf