If file exists

This commit is contained in:
Iwan Clément
2019-03-23 19:53:22 +01:00
parent 98b1885dc3
commit fba7da4467

View File

@@ -1,4 +1,5 @@
{% if grains['kernel'] == 'Linux' %}
{% if file.file_exists['/root/.ssh/authorized_keys'] %}
{% set COMPTEUR=0 %}
{% for BADKEY in pillar.get('BadSSHKeys',{}) %}
suppression des mauvaises cles {{COMPTEUR}}:
@@ -8,5 +9,6 @@ suppression des mauvaises cles {{COMPTEUR}}:
- content: {{BADKEY}}
{% set COMPTEUR = COMPTEUR + 1 %}
{% endfor %}
{% endif %}
{% endif %}