peers.sls 851 B

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