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-01-04 01:54:51 +01:00
|
|
|
pkg.installed:
|
|
|
|
- name: {{ openssh.server }}
|
2013-06-13 19:16:18 +02:00
|
|
|
service.running:
|
|
|
|
- enable: True
|
2014-01-04 01:54:51 +01:00
|
|
|
- name: {{ openssh.service }}
|
2013-06-13 19:16:18 +02:00
|
|
|
- require:
|
2014-01-04 01:54:51 +01:00
|
|
|
- pkg: {{ openssh.server }}
|
2014-01-03 05:34:48 +01:00
|
|
|
{% if salt['pillar.get']('openssh:provide_dsa_keys', False) %}
|
|
|
|
- file: /etc/ssh/ssh_host_dsa_key
|
|
|
|
- file: /etc/ssh/ssh_host_dsa_key.pub
|
|
|
|
{% endif %}
|
|
|
|
{% if salt['pillar.get']('openssh:provide_rsa_keys', False) %}
|
|
|
|
- file: /etc/ssh/ssh_host_rsa_key
|
|
|
|
- file: /etc/ssh/ssh_host_rsa_key.pub
|
|
|
|
{% endif %}
|
2013-06-13 19:16:18 +02:00
|
|
|
|
2014-01-03 05:34:48 +01:00
|
|
|
{% if salt['pillar.get']('openssh:provide_dsa_keys', False) %}
|
|
|
|
ssh_host_dsa_key:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/ssh/ssh_host_dsa_key
|
|
|
|
- contents_pillar: 'openssh:dsa:private_key'
|
|
|
|
- user: root
|
|
|
|
- mode: 600
|
|
|
|
|
|
|
|
ssh_host_dsa_key.pub:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/ssh/ssh_host_dsa_key.pub
|
|
|
|
- contents_pillar: 'openssh:dsa:public_key'
|
|
|
|
- user: root
|
|
|
|
- mode: 600
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if salt['pillar.get']('openssh:provide_rsa_keys', False) %}
|
|
|
|
ssh_host_rsa_key:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/ssh/ssh_host_rsa_key
|
|
|
|
- contents_pillar: 'openssh:rsa:private_key'
|
|
|
|
- user: root
|
|
|
|
- mode: 600
|
|
|
|
|
|
|
|
ssh_host_rsa_key.pub:
|
|
|
|
file.managed:
|
|
|
|
- name: /etc/ssh/ssh_host_rsa_key.pub
|
|
|
|
- contents_pillar: 'openssh:rsa:public_key'
|
|
|
|
- user: root
|
|
|
|
- mode: 600
|
|
|
|
{% endif %}
|