main.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: Ensure package resolvconf is absent
  6. apt: name=resolvconf stage=absent purge=yes
  7. - name: Install custom resolv.conf
  8. template: src=resolv.conf.j2 dest=/etc/resolv.conf
  9. - name: Make sure necessary tools are installed
  10. apt: name={{item}} state=present
  11. with_items:
  12. - wget
  13. - ntp
  14. - git
  15. - name: Install dependencies for ffrl tools
  16. apt: name={{item}}
  17. with_items:
  18. - python3
  19. - python3-pip
  20. - name: Install crontab to update the blacklist
  21. cron:
  22. name: Update blacklist
  23. minute: '*/5'
  24. job: wget -q -O /etc/fastd/fastd-blacklist.json https://raw.githubusercontent.com/ffruhr/fastdbl/master/fastd-blacklist.json
  25. - name: Install verify shell script
  26. template: src=fastd-blacklist.sh.j2 dest=/etc/fastd/fastd-blacklist.sh mode="u=rwx,g=rx,o=r"
  27. - name: Install ntp.conf
  28. template: src=ntp.conf.j2 dest=/etc/ntp.conf
  29. - name: Install python dependencies for ffrl tools
  30. pip: name={{item}} executable={{supernode_pip_executable}}
  31. with_items:
  32. - pyroute2
  33. - name: Create install dir for ffrl tools
  34. file: dest={{supernode_freifunk_tools_dir}} state=directory
  35. - name: Clone ffrl tools
  36. git: repo={{supernode_freifunk_tools_repo}} dest={{supernode_freifunk_tools_dir}}
  37. - name: Install nodeinfo cron job
  38. template: src=nodeinfo.cron.j2 dest=/etc/cron.d/nodeinfo