main.yml 1.2 KB

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