commit | ba9c15341d389965ee4a9fab568d63edaff2b92d | [log] [tgz] |
---|---|---|
author | tomas kamm <tomas@kamm.cz> | Mon May 15 15:37:50 2017 +0200 |
committer | tomas kamm <tomas@kamm.cz> | Mon May 15 15:37:50 2017 +0200 |
tree | a83c81866d7f392217e98248b0ae84ca34ac8ebb | |
parent | d33c8ddcf27b1498d82e10fc12171c93d0e2650a [diff] |
remove authorized_keys file if purge is enable and list of keys is empty
diff --git a/openssh/server/public_key.sls b/openssh/server/public_key.sls index 71fcbf3..97dc127 100644 --- a/openssh/server/public_key.sls +++ b/openssh/server/public_key.sls
@@ -39,8 +39,17 @@ {%- endif %} +{%- else %} + +{%- if user.get('purge', False) %} +{{ user.user.name }}_auth_keys: + file.absent: + - name: {{ user.user.home }}/.ssh/authorized_keys +{%- endif %} + {%- endif %} {%- endfor %} {%- endif %} +