removed bloat and doing dkms in ansible now

This commit is contained in:
Bastian Mäuser 2018-02-04 20:06:39 +01:00
parent cf9f284f16
commit 40a8040047

View File

@ -8,8 +8,6 @@
when: batman_dkms == true when: batman_dkms == true
apt: name={{ item }} apt: name={{ item }}
with_items: with_items:
- ruby
- ruby-dev
- build-essential - build-essential
- curl - curl
- dkms - dkms
@ -17,58 +15,38 @@
- libnl-genl-3-dev - libnl-genl-3-dev
- linux-headers-{{ ansible_kernel }} - linux-headers-{{ ansible_kernel }}
- name: Install Ruby GEM - name: Download batman-adv source
when: batman_dkms == true when: batman_dkms == true
gem: name=fpm-cookery get_url: url="https://downloads.open-mesh.org/batman/releases/batman-adv-{{ batman-adv_version }}/batman-adv-{{ batman-adv_version }}.tar.gz"
dest=/tmp/batman-adv-{{ batman-adv_version }}.tar.gz
checksum=sha256:{{ batman-adv_tar_sha256_hash }}
- name: Cloning FFNW Repo - name: Unpack batman-adv source
when: batman_dkms == true when: batman_dkms == true
git: repo=https://git.ffnw.de/ffnw-server/ffnw-debian unarchive: src=/tmp/batman-adv-{{ batman-adv_version }}.tar.gz
dest=/opt/ffnw-debian dest=/usr/src/
recursive=yes copy=no
force=yes
- name: Cook batman-adv-dkms - name: Install dkms.conf
when: batman_dkms == true when: batman_dkms == true
command: /usr/local/bin/fpm-cook template: src=dkms.conf.j2
args: dest="/usr/src/batman-adv-{{ batman-adv_version }}/dkms.conf"
chdir: /opt/ffnw-debian/batman-adv-dkms
- name: Get cooked Debian Packages to List - name: Add module via dkms
when: batman_dkms == true when: batman_dkms == true
shell: "find *.deb" command: dkms add -m batman-adv -v "{{ batman-adv_version }}"
register: pkg_list
args:
chdir: /opt/ffnw-debian/batman-adv-dkms/pkg
- name: Install batman-adv-dkms - name: Build module via dkms
when: batman_dkms == true when: batman_dkms == true
command: "/usr/bin/dpkg -i {{ item }}" command: dkms build -m batman-adv -v "{{ batman-adv_version }}"
args:
chdir: /opt/ffnw-debian/batman-adv-dkms/pkg
with_items:
- "{{ pkg_list.stdout_lines }}"
- name: Cook batctl - name: Install module via dkms
when: batman_dkms == true when: batman_dkms == true
command: /usr/local/bin/fpm-cook command: dkms install -m batman-adv -v "{{ batman-adv_version }}"
args:
chdir: /opt/ffnw-debian/batctl
- name: Get cooked Debian Packages to List - name: Rebuild kernel initramfs
when: batman_dkms == true when: batman_dkms == true
shell: "find *.deb" command: update-initramfs -c -k all
register: pkg_list
args:
chdir: /opt/ffnw-debian/batctl/pkg
- name: Install batctl
when: batman_dkms == true
command: "/usr/bin/dpkg -i {{ item }}"
args:
chdir: /opt/ffnw-debian/batctl/pkg
with_items:
- "{{ pkg_list.stdout_lines }}"
- name: Enable batman during boot - name: Enable batman during boot
lineinfile: dest=/etc/modules line=batman-adv lineinfile: dest=/etc/modules line=batman-adv