2014-01-04 03:32:05 +01:00
|
|
|
{% from "openssh/map.jinja" import openssh with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- openssh
|
|
|
|
|
|
|
|
sshd_config:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ openssh.sshd_config }}
|
|
|
|
- source: {{ openssh.sshd_config_src }}
|
2014-01-09 13:57:00 +01:00
|
|
|
- template: jinja
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
2014-01-04 03:32:05 +01:00
|
|
|
- watch_in:
|
2014-01-09 13:54:49 +01:00
|
|
|
- service: openssh
|
2014-01-04 03:32:05 +01:00
|
|
|
|
2014-03-17 23:17:04 +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
|
|
|
|
- require_in:
|
|
|
|
- service: {{ openssh.service }}
|
|
|
|
|
|
|
|
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
|
|
|
|
- require_in:
|
|
|
|
- service: {{ openssh.service }}
|
|
|
|
{% 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
|
|
|
|
- require_in:
|
|
|
|
- service: {{ openssh.service }}
|
|
|
|
|
|
|
|
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
|
|
|
|
- require_in:
|
|
|
|
- service: {{ openssh.service }}
|
|
|
|
{% endif %}
|