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

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