openssh-formula/openssh/init.sls

24 lines
609 B
Plaintext
Raw Normal View History

{% from "openssh/map.jinja" import openssh with context %}
2013-06-13 19:16:18 +02:00
openssh:
2014-08-08 14:38:27 +02:00
{% if openssh.server is defined %}
pkg.installed:
- name: {{ openssh.server }}
{% if openssh.server_version is defined %}
- version: {{ openssh.server_version }}
{% endif %}
2014-08-08 14:38:27 +02:00
{% endif %}
{% if openssh.sshd_enable is sameas true %}
2013-06-13 19:16:18 +02:00
service.running:
- enable: {{ openssh.sshd_enable }}
- name: {{ openssh.service }}
2014-08-08 14:38:27 +02:00
{% if openssh.server is defined %}
2013-06-13 19:16:18 +02:00
- require:
- pkg: {{ openssh.server }}
2014-08-08 14:38:27 +02:00
{% endif %}
{% else %}
service.dead:
- enable: False
- name: {{ openssh.service }}
{% endif %}