main.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. - name: benötigte Pakete installieren
  2. apt:
  3. pkg: "{{ item }}"
  4. state: installed
  5. with_items:
  6. - build-essential
  7. - checkinstall
  8. - pkg-config
  9. - libnl-3-dev
  10. - libnl-genl-3-dev
  11. - libcap-dev
  12. - libgps-dev
  13. - name: batctl-Quellen laden und entpacken
  14. unarchive: src=batctl-2016.4.tar.gz dest=/usr/src
  15. - stat: path=/usr/local/sbin/batctl
  16. register: batctl
  17. - name: batctl Version prüfen
  18. shell: '{{batctl.stat.path}} -v | grep -oE "batctl [0-9]+\.[0-9]+"'
  19. when: batctl.stat.exists == True
  20. changed_when: False
  21. register: batctl_version
  22. #- name: batctl bauen
  23. # shell: "make && checkinstall -y make install"
  24. # args:
  25. # chdir: /usr/src/batctl-2016.4
  26. # when: batctl.stat.exists == False or batctl_version.stdout_lines[0] != "batctl 2016.4"
  27. #- name: alfred-Quellen laden und entpacken
  28. # unarchive: src=alfred-2015.1.tar.gz dest=/usr/src
  29. #
  30. #- stat: path=/usr/local/sbin/alfred
  31. # register: alfred
  32. #- name: alfred bauen
  33. # shell: "make && checkinstall -y make install"
  34. # args:
  35. # chdir: /usr/src/alfred-2015.1
  36. # notify:
  37. # - restart networking
  38. # when: alfred.stat.exists == False
  39. # creating batman interfaces
  40. - name: Create interfaces - batman file
  41. template: src="batman.j2" dest="/etc/network/interfaces.d/30_batman.cfg"
  42. notify:
  43. - restart networking
  44. #append line in interfaces file for reading additional config files
  45. - name: let read interfaces from interfaces
  46. lineinfile: dest="/etc/network/interfaces" line="source /etc/network/interfaces.d/*"
  47. notify:
  48. - restart networking