Saltstack Official OpenSSH Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
646B

  1. {% from "openssh/map.jinja" import mapdata with context %}
  2. {%- set openssh = mapdata.openssh %}
  3. openssh:
  4. {% if openssh.server is defined %}
  5. pkg.installed:
  6. - name: {{ openssh.server }}
  7. {% if openssh.server_version is defined %}
  8. - version: {{ openssh.server_version }}
  9. {% endif %}
  10. {% endif %}
  11. {% if openssh.sshd_enable is sameas true %}
  12. service.running:
  13. - enable: {{ openssh.sshd_enable }}
  14. - name: {{ openssh.service }}
  15. {% if openssh.server is defined %}
  16. - require:
  17. - pkg: {{ openssh.server }}
  18. {% endif %}
  19. {% else %}
  20. service.dead:
  21. - enable: False
  22. - name: {{ openssh.service }}
  23. {% endif %}