main.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. # tasks file for ff-supernode
  3. - include_vars: "{{ ansible_distribution }}-{{ansible_distribution_release }}.yml"
  4. when: ansible_distribution_release == 'wheezy' and ansible_distribution == 'Debian'
  5. - name: Install custom resolv.conf
  6. template: src=resolv.conf.j2 dest=/etc/resolv.conf
  7. - name: Make sure necessary tools are installed
  8. apt: name={{item}} state=present
  9. with_items:
  10. - wget
  11. - ntp
  12. - git
  13. - name: Install dependencies for ffrl tools
  14. apt: name={{item}}
  15. with_items:
  16. - python3
  17. - python3-pip
  18. - name: Install crontab to update the blacklist
  19. cron:
  20. name: Update blacklist
  21. minute: '*/5'
  22. job: wget -q -O /etc/fastd/fastd-blacklist.json https://raw.githubusercontent.com/ffruhr/fastdbl/master/fastd-blacklist.json
  23. - name: Install verify shell script
  24. template: src=fastd-blacklist.sh.j2 dest=/etc/fastd/fastd-blacklist.sh mode="u=rwx,g=rx,o=r"
  25. - name: Install systemd services
  26. template: src={{item}}.service.j2 dest=/etc/systemd/system/{{item}}.service
  27. with_items:
  28. - alfred
  29. - batadv-vis
  30. - name: Enable and start systemd services
  31. service: name={{item}} enabled=yes state=started
  32. with_items:
  33. - alfred
  34. - batadv-vis
  35. - name: Install ntp.conf
  36. template: src=ntp.conf.j2 dest=/etc/ntp.conf
  37. - name: Install python dependencies for ffrl tools
  38. pip: name={{item}} executable={{supernode_pip_executable}}
  39. with_items:
  40. - pyroute2
  41. - name: Create install dir for ffrl tools
  42. file: dest={{supernode_freifunk_tools_dir}} state=directory
  43. - name: Clone ffrl tools
  44. git: repo={{supernode_freifunk_tools_repo}} dest={{supernode_freifunk_tools_dir}}
  45. - name: Install nodeinfo cron job
  46. template: src=nodeinfo.cron.j2 dest=/etc/cron.d/nodeinfo