main.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. # tasks file for ff-supernode
  3. - include: debian.yml
  4. when: ansible_distribution == 'Debian'
  5. - include: debian.yml
  6. when: ansible_distribution == 'Ubuntu'
  7. - name: Install crontab to update the blacklist
  8. cron:
  9. name: Update blacklist
  10. minute: '*/5'
  11. job: wget -q -O /etc/fastd/fastd-blacklist.json https://raw.githubusercontent.com/ffruhr/fastdbl/master/fastd-blacklist.json
  12. - name: Install verify shell script
  13. template: src=fastd-blacklist.sh.j2 dest=/etc/fastd/fastd-blacklist.sh mode="u=rwx,g=rx,o=r"
  14. - name: Create supervisor services
  15. template: src=supervisor.service.j2 dest=/etc/supervisor/conf.d/{{item.name}}.conf
  16. with_items: "{{supervisor_services}}"
  17. notify: Restart supervisor
  18. - name: Install ntp.conf
  19. template: src=ntp.conf.j2 dest=/etc/ntp.conf
  20. - name: Install python dependencies for ffrl tools
  21. pip: name={{item}} executable=pip3
  22. with_items:
  23. - pyroute2
  24. - name: Create install dir for ffrl tools
  25. file: dest={{supernode_freifunk_tools_dir}} state= directory
  26. - name: Clone ffrl tools
  27. git: repo={{supernode_freifunk_tools_repo}} dest={{supernode_freifunk_tools_dir}}
  28. - name: Install nodeinfo cron job
  29. cron:
  30. name: nodeinfo.py
  31. job: "{{supernode_freifunk_tools_dir}}/nodeinfo/nodeinfo.py | gzip | alfred -s 158"
  32. user: root