peers.sls 906 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #
  2. # FFPB Gateways specific stuff
  3. #
  4. # include ffpb stuff (git.c3pb.pubkey, ffpb.id_rsa)
  5. include:
  6. - ffho_base
  7. - keys
  8. # Pull fastd mesh peers git
  9. peers-git:
  10. git.latest:
  11. - name: git@git.c3pb.de:freifunk-sensitive/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. - ssh_known_hosts: git.c3pb.pubkey
  18. - file: /root/.ssh/ffho_peers_git.id_rsa
  19. # Update script
  20. /usr/local/sbin/ff_update_peers:
  21. file.managed:
  22. - source: salt://fastd/ff_update_peers
  23. - user: root
  24. - group: root
  25. - mode: 744
  26. ## update cronjob
  27. fastd-update-peers:
  28. cron.present:
  29. - name: /usr/local/sbin/ff_update_peers 2>&1 | /usr/local/bin/ff_log_to_bot
  30. - identifier: fastd-update-peers
  31. - user: root
  32. - minute: '*/5'
  33. - require:
  34. - file: /usr/local/sbin/ff_update_peers
  35. - git: peers-git