0
0
mirror of https://github.com/saltstack-formulas/openssh-formula.git synced 2024-11-28 03:28:09 +01:00
openssh-formula/openssh/init.sls
reschl ffafd2a2f5 Support package versions (#134)
added possibility to configure server version and client version
with pillar example
2018-09-03 16:42:39 +02:00

24 lines
609 B
Plaintext

{% from "openssh/map.jinja" import openssh with context %}
openssh:
{% if openssh.server is defined %}
pkg.installed:
- name: {{ openssh.server }}
{% if openssh.server_version is defined %}
- version: {{ openssh.server_version }}
{% endif %}
{% endif %}
{% if openssh.sshd_enable is sameas true %}
service.running:
- enable: {{ openssh.sshd_enable }}
- name: {{ openssh.service }}
{% if openssh.server is defined %}
- require:
- pkg: {{ openssh.server }}
{% endif %}
{% else %}
service.dead:
- enable: False
- name: {{ openssh.service }}
{% endif %}