base.sls 763 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # network.interface.base
  3. #
  4. # Install required packets and write /etc/network/interfaces but don't apply it!
  5. ifupdown2:
  6. pkg.installed
  7. # Require for some functions of ffho_net module, so make sure they are present.
  8. # Used by functions for bird and dhcp-server for example.
  9. python-ipcalc:
  10. pkg.installed
  11. # ifupdown2 configuration
  12. /etc/network/ifupdown2/ifupdown2.conf:
  13. file.managed:
  14. - source:
  15. - salt://network/ifupdown2.conf.{{ grains['oscodename'] }}
  16. - salt://network/ifupdown2.conf
  17. - require:
  18. - pkg: ifupdown2
  19. - pkg: python-ipcalc
  20. # Write network configuration
  21. /etc/network/interfaces:
  22. file.managed:
  23. - template: jinja
  24. - source: salt://network/interfaces/interfaces.tmpl
  25. - require:
  26. - pkg: ifupdown2