Explorar el Código

batman_adv is now installed for ubuntu based distros since ubuntu doesn't seem to add this module to their kernel by default

Till Klocke hace 10 años
padre
commit
4fa1412c87
Se han modificado 2 ficheros con 19 adiciones y 94 borrados
  1. 7 93
      roles/batman/meta/main.yml
  2. 12 1
      roles/batman/tasks/main.yml

+ 7 - 93
roles/batman/meta/main.yml

@@ -1,104 +1,18 @@
 ---
 galaxy_info:
   author: Till Klocke
-  description: 
+  description: Install B.A.T.M.A.N.
   company: Freifunk Dortmund
   license: MIT
   min_ansible_version: 1.2
-  #
-  # Below are all platforms currently available. Just uncomment
-  # the ones that apply to your role. If you don't see your 
-  # platform on this list, let us know and we'll get it added!
-  #
   platforms:
-  #- name: EL
-  #  versions:
-  #  - all
-  #  - 5
-  #  - 6
-  #  - 7
-  #- name: GenericUNIX
-  #  versions:
-  #  - all
-  #  - any
-  #- name: Fedora
-  #  versions:
-  #  - all
-  #  - 16
-  #  - 17
-  #  - 18
-  #  - 19
-  #  - 20
-  #  - 21
-  #  - 22
-  #- name: SmartOS
-  #  versions:
-  #  - all
-  #  - any
-  #- name: opensuse
-  #  versions:
-  #  - all
-  #  - 12.1
-  #  - 12.2
-  #  - 12.3
-  #  - 13.1
-  #  - 13.2
-  #- name: Amazon
-  #  versions:
-  #  - all
-  #  - 2013.03
-  #  - 2013.09
-  #- name: GenericBSD
-  #  versions:
-  #  - all
-  #  - any
-  #- name: FreeBSD
-  #  versions:
-  #  - all
-  #  - 8.0
-  #  - 8.1
-  #  - 8.2
-  #  - 8.3
-  #  - 8.4
-  #  - 9.0
-  #  - 9.1
-  #  - 9.1
-  #  - 9.2
-  #- name: Ubuntu
-  #  versions:
-  #  - all
-  #  - lucid
-  #  - maverick
-  #  - natty
-  #  - oneiric
-  #  - precise
-  #  - quantal
-  #  - raring
-  #  - saucy
-  #  - trusty
-  #  - utopic
-  #  - vivid
-  #- name: SLES
-  #  versions:
-  #  - all
-  #  - 10SP3
-  #  - 10SP4
-  #  - 11
-  #  - 11SP1
-  #  - 11SP2
-  #  - 11SP3
-  #- name: GenericLinux
-  #  versions:
-  #  - all
-  #  - any
+  - name: Ubuntu
+    versions:
+    - all
   - name: Debian
     versions:
-  #  - all
-  #  - etch
-    - jessie
-  #  - lenny
-  #  - squeeze
-  #  - wheezy
+    - all
   categories:
   - networking
-dependencies: []
+dependencies:
+  - repo-universe-factory

+ 12 - 1
roles/batman/tasks/main.yml

@@ -5,4 +5,15 @@
   apt: name={{item}} state=present
   with_items:
   - batctl
-  - batmand
+
+- name: Install B.A.T.M.A.N. kernel module
+  when: ansible_distribution == "Ubuntu"
+  apt: name=batman-adv-dkms state=present
+
+- name: Enable batman module on boot
+  lineinfile: dest=/etc/modules line=batman_adv
+
+- name: Load batman-adv kernel module
+  modprobe: name=batman_adv state=present
+
+# TODO make sure bat14 mode is used