0
0
mirror of https://github.com/saltstack-formulas/openssh-formula.git synced 2024-11-28 05:38:20 +01:00
openssh-formula/openssh/config.sls
Alan Pearce 2876a691b0 Remove reference to root group
By not specifying it, root user's group should be used.
2014-08-19 21:44:38 +01:00

55 lines
1.3 KiB
Plaintext

{% from "openssh/map.jinja" import openssh with context %}
include:
- openssh
sshd_config:
file.managed:
- name: {{ openssh.sshd_config }}
- source: {{ openssh.sshd_config_src }}
- template: jinja
- user: root
- mode: 644
- watch_in:
- service: openssh
{% 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 %}