Browse Source

Only downgrade batman version on legacy gateways.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 years ago
parent
commit
e7b795349a
2 changed files with 10 additions and 8 deletions
  1. 1 1
      batman/ff_fix_batman
  2. 9 7
      batman/init.sls

+ 1 - 1
batman/ff_fix_batman

@@ -9,7 +9,7 @@
 # fastd for batman'ish things currently, that's fine.
 #
 
-batman_version_wanted="2013.4.0"
+batman_version_wanted="2016.3"
 
 # Bail on error
 set -e

+ 9 - 7
batman/init.sls

@@ -7,28 +7,29 @@
 # has been configured for this node.
 #
 {%- set roles = salt['pillar.get']('nodes:' ~ grains['id']  ~ ':roles', []) %}
-{%- if 'batman' in roles %}
 include:
   - apt
 
-batman-adv-dkms:
-  pkg.installed:
-    - require:
-      - pkgrepo: apt-neoraider
-
+{%- if 'batman' in roles %}
 batctl:
   pkg.installed:
     - require:
       - pkgrepo: apt-neoraider
 
 
-# Conveniance bat-hosts file for informative batctl output
+# Convenience bat-hosts file for informative batctl output
 /etc/bat-hosts:
   file.managed:
     - source: salt://batman/bat-hosts.tmpl
     - template: jinja
 
 
+  {% if salt['ffho.re_search'] ('-v14', grains['id']) %}
+batman-adv-dkms:
+  pkg.installed:
+    - require:
+      - pkgrepo: apt-neoraider
+
 # The ff_fix_batman script ensures that the preferred (currently older) version
 # of the batman_adv kernel module is compiled via DKMS and installed into the
 # system.
@@ -67,6 +68,7 @@ enable-ff-fix-batman-service:
     - require:
       - file: /lib/systemd/system/ff-fix-batman.service
 
+  {% endif %}
 
 # Make sure the batman_adv module is loaded at boot time
 /etc/modules-load.d/batman-adv.conf: