init.sls 690 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # sysctl
  3. #
  4. {%- set roles = salt['pillar.get']('roles', []) %}
  5. # Define command to reload sysctl settings here without dependencies
  6. # and define inverse dependencies where useful (see sysctl.conf)
  7. reload-sysctl:
  8. cmd.wait:
  9. - watch: []
  10. - name: /sbin/sysctl --system
  11. /etc/sysctl.conf:
  12. file.managed:
  13. - source: salt://sysctl/sysctl.conf
  14. - watch_in:
  15. - cmd: reload-sysctl
  16. /etc/sysctl.d/global.conf:
  17. file.managed:
  18. - source: salt://sysctl/global.conf
  19. - watch_in:
  20. - cmd: reload-sysctl
  21. {%- if router in roles %}
  22. /etc/sysctl.d/global.conf:
  23. file.managed:
  24. - source: salt://sysctl/router.conf
  25. - watch_in:
  26. - cmd: reload-sysctl
  27. {%- endif %}