init.sls 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # SNMPd
  3. #
  4. include:
  5. - network.interfaces
  6. #
  7. # Install and start SNMPd
  8. # Require /etc/network/interfaces to be installed (and ifreload'ed) so we
  9. # can simply pick lookback IP addresses from grains.
  10. snmpd:
  11. pkg.installed:
  12. - name: snmpd
  13. - require:
  14. - file: /etc/network/interfaces
  15. service.running:
  16. - enable: true
  17. - reload: true
  18. /etc/default/snmpd:
  19. file.managed:
  20. - source: salt://snmpd/default_snmpd
  21. - require:
  22. - pkg: snmpd
  23. - watch_in:
  24. - service: snmpd
  25. /etc/snmp/snmpd.conf:
  26. file.managed:
  27. - template: jinja
  28. - source: salt://snmpd/snmpd.conf
  29. - require:
  30. - pkg: snmpd
  31. - watch_in:
  32. - service: snmpd
  33. /etc/snmp/ifAlias:
  34. file.managed:
  35. - source: salt://snmpd/ifAlias
  36. - user: root
  37. - group: root
  38. - mode: 755
  39. - require:
  40. - pkg: snmpd
  41. # TODO: Lookback-IP aus grains