init.sls 630 B

123456789101112131415161718192021222324252627282930313233
  1. #
  2. # /etc/network/interfaces
  3. #
  4. ifupdown2:
  5. pkg.installed
  6. # ifupdown2 configuration
  7. /etc/network/ifupdown2/ifupdown2.conf:
  8. file.managed:
  9. - source: salt://network/ifupdown2.conf
  10. - require:
  11. - pkg: ifupdown2
  12. # Write network configuration
  13. /etc/network/interfaces:
  14. file.managed:
  15. - template: jinja
  16. - source: salt://network/interfaces/interfaces.tmpl
  17. - require:
  18. - pkg: ifupdown2
  19. # Reload interface configuration if neccessary
  20. ifreload:
  21. cmd.wait:
  22. - name: /sbin/ifreload -a
  23. - watch:
  24. - file: /etc/network/interfaces
  25. - require:
  26. - file: /etc/network/ifupdown2/ifupdown2.conf