Saltstack Official Linux Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

123456789101112131415161718192021222324252627282930313233343536
  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- if system.env|length > 0 %}
  4. linux_system_environment_proxies:
  5. file.blockreplace:
  6. - name: /etc/environment
  7. - marker_start: '# START - SALT MANAGED VARIABLES, DO NOT EDIT'
  8. - marker_end: '# END - SALT MANAGED VARIABLES'
  9. - template: jinja
  10. - source: salt://linux/files/etc_environment
  11. - append_if_not_found: True
  12. - backup: '.bak'
  13. - show_changes: True
  14. - defaults:
  15. variables: {{ system.env | yaml }}
  16. no_proxy: {{ system.env.get('no_proxy', None) }}
  17. https_proxy: {{ system.env.get('https_proxy', None) }}
  18. http_proxy: {{ system.env.get('http_proxy', None) }}
  19. ftp_proxy: {{ system.env.get('ftp_proxy', None) }}
  20. {%- else %}
  21. linux_system_environment_proxies:
  22. file.blockreplace:
  23. - name: /etc/environment
  24. - marker_start: '# SALT MANAGED VARIABLES - DO NOT EDIT - START'
  25. - content: '# '
  26. - marker_end: '# SALT MANAGED VARIABLES - END'
  27. - append_if_not_found: True
  28. - backup: '.bak'
  29. - show_changes: True
  30. {%- endif %}
  31. {%- endif %}