main.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 ntp.conf
  26. template: src=ntp.conf.j2 dest=/etc/ntp.conf
  27. - name: Install python dependencies for ffrl tools
  28. pip: name={{item}} executable={{supernode_pip_executable}}
  29. with_items:
  30. - pyroute2
  31. - name: Create install dir for ffrl tools
  32. file: dest={{supernode_freifunk_tools_dir}} state=directory
  33. - name: Clone ffrl tools
  34. git: repo={{supernode_freifunk_tools_repo}} dest={{supernode_freifunk_tools_dir}}
  35. - name: Install nodeinfo cron job
  36. template: src=nodeinfo.cron.j2 dest=/etc/cron.d/nodeinfo