0
0
mirror of https://github.com/saltstack-formulas/openssh-formula.git synced 2024-11-28 07:48:17 +01:00
openssh-formula/openssh/init.sls

25 lines
646 B
Plaintext
Raw Normal View History

{% from "openssh/map.jinja" import mapdata with context %}
{%- set openssh = mapdata.openssh %}
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 %}