init.sls 826 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # /etc/network/interfaces
  3. #
  4. ifupdown2:
  5. pkg.installed
  6. # Require for some functions of ffho_net module, so make sure they are present.
  7. # Used by functions for bird and dhcp-server for example.
  8. python-ipcalc:
  9. pkg.installed
  10. # ifupdown2 configuration
  11. /etc/network/ifupdown2/ifupdown2.conf:
  12. file.managed:
  13. - source: salt://network/ifupdown2.conf
  14. - require:
  15. - pkg: ifupdown2
  16. - pkg: python-ipcalc
  17. # Write network configuration
  18. /etc/network/interfaces:
  19. file.managed:
  20. - template: jinja
  21. - source: salt://network/interfaces/interfaces.tmpl
  22. - require:
  23. - pkg: ifupdown2
  24. # Reload interface configuration if neccessary
  25. ifreload:
  26. cmd.wait:
  27. - name: /sbin/ifreload -a
  28. - watch:
  29. - file: /etc/network/interfaces
  30. - require:
  31. - file: /etc/network/ifupdown2/ifupdown2.conf