From 07bcfca54d36c6c3ac1549a8be58933b5e5048c4 Mon Sep 17 00:00:00 2001 From: Julian Labus Date: Thu, 2 May 2019 15:57:52 +0200 Subject: [PATCH] Remove Role service-respondd superseded by yanic respondd --- roles/service-respondd/README.md | 17 ------- roles/service-respondd/handlers/main.yml | 10 ---- roles/service-respondd/tasks/main.yml | 47 ------------------- .../templates/respondd.service.j2 | 12 ----- 4 files changed, 86 deletions(-) delete mode 100644 roles/service-respondd/README.md delete mode 100644 roles/service-respondd/handlers/main.yml delete mode 100644 roles/service-respondd/tasks/main.yml delete mode 100644 roles/service-respondd/templates/respondd.service.j2 diff --git a/roles/service-respondd/README.md b/roles/service-respondd/README.md deleted file mode 100644 index 535f1e8..0000000 --- a/roles/service-respondd/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ansible role service-respondd - -Diese Ansible role installiert und konfiguriert die respondd Implementierung `mesh-announce`. -Pro Mesh Netzwerk muss eine `mesh-announce`-Instanz laufen. - -- installiert `mesh-announce` (Github Clone) -- installiert pro Mesh Netzwerk eine systemd unit - -## Benötigte Variablen - -- Dictionary `meshes` - -``` -meshes: - - id: xx - site_code: # string -``` diff --git a/roles/service-respondd/handlers/main.yml b/roles/service-respondd/handlers/main.yml deleted file mode 100644 index 716ec0a..0000000 --- a/roles/service-respondd/handlers/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: reload systemd - systemd: - daemon_reload: yes - -- name: restart respondd - systemd: - name: "respondd-{{ item.id }}" - state: restarted - loop: "{{ meshes }}" diff --git a/roles/service-respondd/tasks/main.yml b/roles/service-respondd/tasks/main.yml deleted file mode 100644 index 8b3950f..0000000 --- a/roles/service-respondd/tasks/main.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -- name: install packages - package: - name: python3-netifaces - state: present - -- name: clone respondd repo - git: - repo: https://github.com/freifunk-mwu/mesh-announce.git - dest: /home/admin/clones/mesh-announce - version: mwu-respondd - force: yes - become: false - -- name: set respondd vpn flag to false - when: server_type != "gateway" - copy: - content: "False" - dest: /home/admin/clones/mesh-announce/nodeinfo.d/vpn - notify: - - restart respondd - -- name: set firmware version - copy: - content: "call(['lsb_release','-rs'])[0]" - dest: /home/admin/clones/mesh-announce/nodeinfo.d/software/firmware/release - notify: - - restart respondd - -- name: write systemd unit files - template: - src: respondd.service.j2 - dest: "/etc/systemd/system/respondd-{{ item.id }}.service" - owner: root - group: root - mode: 0644 - notify: - - reload systemd - - restart respondd - loop: "{{ meshes }}" - -- name: configure systemd unit files - systemd: - name: "respondd-{{ item.id }}" - enabled: yes - state: started - loop: "{{ meshes }}" diff --git a/roles/service-respondd/templates/respondd.service.j2 b/roles/service-respondd/templates/respondd.service.j2 deleted file mode 100644 index 77f54da..0000000 --- a/roles/service-respondd/templates/respondd.service.j2 +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=respondd instance {{ item.id }} -After={% for interface in item.fastd.nodes.instances %}fastd@{{ item.id }}vpn-{{ interface.mtu }}.service{% if not loop.last %} {% endif %}{% endfor %} - - -[Service] -ExecStart=/home/admin/clones/mesh-announce/respondd.py -i {{ item.id }}br {% for interface in item.fastd.nodes.instances %}-i {{ item.id }}vpn-{{ interface.mtu }}{% if not loop.last %} {% endif %}{% endfor %} -b {{ item.id }}bat -s {{ site_code }} -d {{ item.domain_code }} --data-provider-directory /home/admin/clones/mesh-announce/ -Restart=always -Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -[Install] -WantedBy=multi-user.target