Add option to remove ssh_host_keys

This commit is contained in:
Niels Abspoel
2015-06-07 20:37:33 +02:00
parent 329ad59401
commit 2a68ccac1a
2 changed files with 13 additions and 0 deletions
+9
View File
@@ -21,6 +21,15 @@ ssh_generate_host_{{ keyType }}_key:
- creates: /etc/ssh/ssh_host_{{ keyType }}_key
- user: root
{% elif salt['pillar.get']('openssh:absent_' ~ keyType ~ '_keys', False) %}
ssh_host_{{ keyType }}_key:
file.absent:
- name: /etc/ssh/ssh_host_{{ keyType }}_key
ssh_host_{{ keyType }}_key.pub:
file.absent:
- name: /etc/ssh/ssh_host_{{ keyType }}_key.pub
{% elif salt['pillar.get']('openssh:provide_' ~ keyType ~ '_keys', False) %}
ssh_host_{{ keyType }}_key:
file.managed: