2014-01-04 01:54:51 +01:00
|
|
|
{% 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 %}
|
2014-01-04 01:54:51 +01:00
|
|
|
pkg.installed:
|
|
|
|
- name: {{ openssh.server }}
|
2014-08-08 14:38:27 +02:00
|
|
|
{% endif %}
|
2015-12-27 18:17:01 +01:00
|
|
|
{% if openssh.sshd_enable is sameas true %}
|
2013-06-13 19:16:18 +02:00
|
|
|
service.running:
|
2015-12-27 18:17:01 +01:00
|
|
|
- enable: {{ openssh.sshd_enable }}
|
2014-01-04 01:54:51 +01:00
|
|
|
- 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:
|
2014-01-04 01:54:51 +01:00
|
|
|
- pkg: {{ openssh.server }}
|
2014-08-08 14:38:27 +02:00
|
|
|
{% endif %}
|
2015-12-27 18:17:01 +01:00
|
|
|
{% else %}
|
|
|
|
service.dead:
|
|
|
|
- enable: False
|
|
|
|
- name: {{ openssh.service }}
|
|
|
|
{% endif %}
|