Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 line
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 %}