peers.sls 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # FFHO Gateways specific stuff
  3. #
  4. # include ffho stuff (ffho.id_rsa)
  5. include:
  6. - ffho_base
  7. - keys
  8. # publish blacklist
  9. /etc/fastd/peers-blacklist:
  10. file.manaed:
  11. - source: salt://fastd/peers-blacklist
  12. - user: root
  13. - group: root
  14. - mode: 644
  15. /etc/fastd/verify-peer.sh:
  16. file.managed:
  17. - source: salt://fastd/verify-peer.sh
  18. - user: root
  19. - group: root
  20. - mode: 744
  21. # Pull fastd mesh peers git
  22. peers-git:
  23. git.latest:
  24. - name: gogs@git.ffho.net:ffho-sensitive/ffho-knoten.git
  25. - target: /etc/freifunk/peers
  26. - rev: master
  27. - identity: /root/.ssh/ffho_peers_git.id_rsa
  28. - user: root
  29. - require:
  30. - file: /root/.ssh/ffho_peers_git.id_rsa
  31. # Update script
  32. /usr/local/sbin/ff_update_peers:
  33. file.managed:
  34. - source: salt://fastd/ff_update_peers
  35. - user: root
  36. - group: root
  37. - mode: 744
  38. ## update cronjob
  39. fastd-update-peers:
  40. cron.present:
  41. - name: /usr/local/sbin/ff_update_peers 2>&1 | /usr/local/bin/ff_log_to_bot
  42. - identifier: fastd-update-peers
  43. - user: root
  44. - minute: '*/5'
  45. - require:
  46. - file: /usr/local/sbin/ff_update_peers
  47. - git: peers-git