Tunneldigger repaired / new repo

This commit is contained in:
Freifunk Troisdorf 2019-01-24 21:10:11 +01:00
parent 24d8a6c970
commit b1f766c946
3 changed files with 36 additions and 14 deletions

View File

@ -4,7 +4,7 @@ address={{ ansible_default_ipv4.address }}
; Ports where the broker will listen on ; Ports where the broker will listen on
port={{ sn_l2tp_tb_port }} port={{ sn_l2tp_tb_port }}
; Interface with that IP address ; Interface with that IP address
interface=eth0 interface=ens18
; Maximum number of cached cookies, required for establishing a ; Maximum number of cached cookies, required for establishing a
; session with the broker ; session with the broker
max_cookies=1024 max_cookies=1024
@ -23,6 +23,18 @@ pmtu_discovery=false
; namespacing to work ; namespacing to work
namespace=troisdorf namespace=troisdorf
; Reject connections if there are less than N seconds since the last connection.
; Can be less than a second (e.g., 0.1).
connection_rate_limit=2
; Set PMTU to a fixed value. Use 0 for automatic PMTU discovery. A non-0 value also disables
; PMTU discovery on the client side, by having the server not respond to client-side PMTU
; discovery probes.
pmtu=0
; The batman device of this Hood (e.g. bat2)
batdev=bat0
[log] [log]
; Log filename ; Log filename
filename=/var/log/tunneldigger-broker.log filename=/var/log/tunneldigger-broker.log

View File

@ -1,9 +1,11 @@
#!/bin/bash #!/bin/bash
WDIR=/srv/tunneldigger WDIR=/srv/tunneldigger/env_tunneldigger
VIRTUALENV_DIR=/srv/tunneldigger VIRTUALENV_DIR=/srv/tunneldigger/env_tunneldigger
cd $WDIR cd $WDIR
source $VIRTUALENV_DIR/bin/activate source $VIRTUALENV_DIR/bin/activate
bin/python broker/l2tp_broker.py l2tp_broker.cfg $VIRTUALENV_DIR/bin/python -m tunneldigger_broker.main ../l2tp_broker.cfg
#bin/python broker/l2tp_broker.py ../l2tp_broker.cfg

View File

@ -9,7 +9,7 @@
user: root user: root
gather_facts: False gather_facts: False
vars: vars:
snversion: master_v3.1.1 snversion: master_v3.1.3
batmanversion: v2017.4 batmanversion: v2017.4
common_required_packages: common_required_packages:
- git - git
@ -44,6 +44,9 @@
- virtualenv - virtualenv
- batman-adv - batman-adv
- batctl - batctl
- libffi-dev
- libnetfilter-conntrack-dev
- libnfnetlink-dev
modules_required: modules_required:
- batman-adv - batman-adv
- nf_conntrack_netlink - nf_conntrack_netlink
@ -88,8 +91,10 @@
# url: https://sks.pod01.fleetstreetops.com # url: https://sks.pod01.fleetstreetops.com
# state: present # state: present
- name: Add backport repo to source list - name: Add Freifuck repo to source list
apt_repository: repo='deb https://freifuck.de/debian stretch main' state=present apt_repository: repo='deb https://freifuck.de/debian stretch main' state=present
- name: Add backport repo to source list
apt_repository: repo='deb http://http.debian.net/debian stretch-backports main' state=present
- name: Update apt cache - name: Update apt cache
apt: update_cache=yes apt: update_cache=yes
- name: Gathering facts - name: Gathering facts
@ -166,21 +171,24 @@
# shell: cd /tmp/batctl && git checkout {{ batmanversion }} && make && make install # shell: cd /tmp/batctl && git checkout {{ batmanversion }} && make && make install
# when: getbatctl.changed # when: getbatctl.changed
- name: Get Tunneldigger - name: Get Tunneldigger
git: repo=https://github.com/Freifunk-Troisdorf/tunneldigger.git dest=/srv/tunneldigger # git: repo=https://github.com/Freifunk-Troisdorf/tunneldigger.git dest=/srv/tunneldigger
# git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger version=v0.3.0 # git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger version=v0.1.0
# git: repo=https://github.com/wlanslovenija/tunneldigger.git dest=/srv/tunneldigger
# git: repo=https://github.com/ffrl/tunneldigger.git dest=/srv/tunneldigger # git: repo=https://github.com/ffrl/tunneldigger.git dest=/srv/tunneldigger
git: repo=https://github.com/rohammer/tunneldigger.git dest=/srv/tunneldigger
# version: release-0.22 # version: release-0.22
register: tunneldigger register: tunneldigger
when: aptupdates.changed when: aptupdates.changed
- name: Configure tunneldigger - name: Configure tunneldigger
command: "{{item}}" raw: "cd /srv/tunneldigger && virtualenv env_tunneldigger && source env_tunneldigger/bin/activate && cd broker && python setup.py install"
with_items: # command: "{{item}}"
# with_items:
# - virtualenv /srv/tunneldigger/ -p python2.7 # - virtualenv /srv/tunneldigger/ -p python2.7
- virtualenv /srv/tunneldigger/ # - virtualenv /srv/tunneldigger/
when: tunneldigger.changed
- name: Tunneldigger requirements
pip: requirements=/srv/tunneldigger/broker/requirements.txt virtualenv=/srv/tunneldigger/
when: tunneldigger.changed when: tunneldigger.changed
# - name: Tunneldigger requirements
# pip: requirements=/srv/tunneldigger/broker/requirements.txt virtualenv=/srv/tunneldigger/
# when: tunneldigger.changed
- name: Copy l2tp broker config template - name: Copy l2tp broker config template
template: src=./files/{{ item }} dest=/srv/tunneldigger owner=root group=root mode=0444 template: src=./files/{{ item }} dest=/srv/tunneldigger owner=root group=root mode=0444
with_items: "{{ broker_cfg }}" with_items: "{{ broker_cfg }}"