Browse Source

Ubuntu specific tasks in the batman role are now in their own file

Till Klocke 9 years ago
parent
commit
2bc039da20
2 changed files with 11 additions and 10 deletions
  1. 1 10
      roles/internal/batman/tasks/main.yml
  2. 10 0
      roles/internal/batman/tasks/ubuntu.yml

+ 1 - 10
roles/internal/batman/tasks/main.yml

@@ -6,17 +6,8 @@
   with_items:
   - batctl
 
-- name: Add universe factory GPG repo key
+- include: ubuntu.yml
   when: ansible_distribution == 'Ubuntu'
-  apt_key: keyserver=pgpkeys.mit.edu id=16EF3F64CB201D9C
-
-- name: Add universe factory repo to get batman-adv kernel module for Ubuntu
-  when: ansible_distribution == 'Ubuntu'
-  apt_repository: repo='deb http://repo.universe-factory.net/debian/ sid main' state=present update_cache=yes
-
-- 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

+ 10 - 0
roles/internal/batman/tasks/ubuntu.yml

@@ -0,0 +1,10 @@
+---
+
+- name: Add universe factory GPG repo key
+  apt_key: keyserver=pgpkeys.mit.edu id=16EF3F64CB201D9C
+
+- name: Add universe factory repo to get batman-adv kernel module for Ubuntu
+  apt_repository: repo='deb http://repo.universe-factory.net/debian/ sid main' state=present update_cache=yes
+
+- name: Install B.A.T.M.A.N. kernel module
+  apt: name=batman-adv-dkms state=present