forked from FF-RGB/ansible
Added batman-adv-dkms build option
This commit is contained in:
parent
09156deb66
commit
1c7be4b822
@ -2,6 +2,8 @@
|
||||
|
||||
batman_ipv4: 10.90.32.11/19
|
||||
batman_ipv6: fdef:f10f:1337:cafe::11/64
|
||||
batman_dkms: false
|
||||
batman_algo: BATMAN_IV
|
||||
global_ipv6: 2a00:9d80:6000:0101::11/64
|
||||
nextnode4: 10.90.32.1
|
||||
nextnode6: fdef:f10f:1337:cafe::1
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
batman_ipv4: 10.90.64.21/19
|
||||
batman_ipv6: fdef:f20f:1337:cafe::21/64
|
||||
batman_dkms: true
|
||||
batman_algo: BATMAN_IV
|
||||
global_ipv6: 2a00:9d80:6000:0102::21/64
|
||||
nextnode4: 10.90.64.1
|
||||
nextnode6: fdef:f20f:1337:cafe::1
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
batman_ipv4: 10.90.96.31/19
|
||||
batman_ipv6: fdef:f30f:1337:cafe::31/64
|
||||
batman_dkms: true
|
||||
batman_algo: BATMAN_V
|
||||
global_ipv6: 2a00:9d80:6000:0103::31/64
|
||||
nextnode4: 10.90.96.1
|
||||
nextnode6: fdef:f30f:1337:cafe::1
|
||||
|
@ -1,8 +1,69 @@
|
||||
---
|
||||
|
||||
- name: Install batctl
|
||||
- name: Install batctl from apt
|
||||
when: batman_dkms == false
|
||||
apt: name=batctl state=latest
|
||||
|
||||
- name: Install dependencies for building DKMS
|
||||
when: batman_dkms == true
|
||||
apt: name={{ item }}
|
||||
with_items:
|
||||
- ruby
|
||||
- ruby-dev
|
||||
- build-essential
|
||||
- curl
|
||||
- dkms
|
||||
- pkgconf
|
||||
- libnl-genl-3-dev
|
||||
- linux-headers-{{ ansible_kernel }}
|
||||
|
||||
- name: Install Ruby GEM
|
||||
when: batman_dkms == true
|
||||
gem: name=fpm-cookery
|
||||
|
||||
- name: Cloning FFNW Repo
|
||||
when: batman_dkms == true
|
||||
git: repo=https://git.ffnw.de/ffnw-server/ffnw-debian
|
||||
dest=/opt/ffnw-debian
|
||||
recursive=yes
|
||||
force=yes
|
||||
|
||||
- name: Cook batman-adv-dkms
|
||||
command: /usr/local/bin/fpm-cook
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batman-adv-dkms
|
||||
|
||||
- name: Get cooked Debian Packages to List
|
||||
shell: "find *.deb"
|
||||
register: pkg_list
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batman-adv-dkms/pkg
|
||||
|
||||
- name: Install batman-adv-dkms
|
||||
command: "/usr/bin/dpkg -i {{ item }}"
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batman-adv-dkms/pkg
|
||||
with_items:
|
||||
- "{{ pkg_list.stdout_lines }}"
|
||||
|
||||
- name: Cook batctl
|
||||
command: /usr/local/bin/fpm-cook
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batctl
|
||||
|
||||
- name: Get cooked Debian Packages to List
|
||||
shell: "find *.deb"
|
||||
register: pkg_list
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batctl/pkg
|
||||
|
||||
- name: Install batctl
|
||||
command: "/usr/bin/dpkg -i {{ item }}"
|
||||
args:
|
||||
chdir: /opt/ffnw-debian/batctl/pkg
|
||||
with_items:
|
||||
- "{{ pkg_list.stdout_lines }}"
|
||||
|
||||
- name: Enable batman during boot
|
||||
lineinfile: dest=/etc/modules line=batman-adv
|
||||
|
||||
|
@ -10,9 +10,9 @@
|
||||
apt: name=ifupdown state=absent
|
||||
|
||||
- name: Configure mesh interfaces
|
||||
template: src=mesh.conf.j2 dest=/etc/network/interfaces.d/mesh.conf
|
||||
template: src=mesh.conf.j2 dest=/etc/network/interfaces.d/mesh.conf backup=yes
|
||||
notify: Reload interfaces
|
||||
|
||||
- name: Configure backbone interfaces
|
||||
template: src=backbone.conf.j2 dest=/etc/network/interfaces.d/backbone.conf
|
||||
template: src=backbone.conf.j2 dest=/etc/network/interfaces.d/backbone.conf backup=yes
|
||||
notify: Reload interfaces
|
||||
|
@ -27,6 +27,7 @@ iface bat-{{ site_code }}
|
||||
#
|
||||
up /usr/sbin/batctl -m bat-{{ site_code }} gw_mode server 100000 100000
|
||||
up /usr/sbin/batctl -m bat-{{ site_code }} it 5000
|
||||
up /usr/sbin/batctl -m bat-{{ site_code }} ra {{ batman_algo }}
|
||||
|
||||
# dmy-{{ site_code }}
|
||||
auto dmy-{{ site_code }}
|
||||
|
Loading…
Reference in New Issue
Block a user