df477b25c2
The `map.jinja` now exports a single variable called `mapdata`. We extract the `openssh`, `sshd_config` and `ssh_config` from it to minimize the changes to `.sls` files.
25 lines
646 B
Plaintext
25 lines
646 B
Plaintext
{% from "openssh/map.jinja" import mapdata with context %}
|
|
{%- set openssh = mapdata.openssh %}
|
|
|
|
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 %}
|