mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-27 22:38:34 +01:00
added option to remove ssh public keys from auth (ssh_auth.absent)
This commit is contained in:
parent
94d53d5ee7
commit
4a8393dca9
@ -24,6 +24,8 @@ users:
|
|||||||
pubkey: PUBLICKEY
|
pubkey: PUBLICKEY
|
||||||
ssh_auth:
|
ssh_auth:
|
||||||
- PUBLICKEY
|
- PUBLICKEY
|
||||||
|
ssh_auth.absent:
|
||||||
|
- PUBLICKEY_TO_BE_REMOVED
|
||||||
|
|
||||||
## Absent user
|
## Absent user
|
||||||
cuser:
|
cuser:
|
||||||
|
@ -123,6 +123,17 @@ ssh_auth_{{ name }}_{{ loop.index0 }}:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if 'ssh_auth.absent' in user %}
|
||||||
|
{% for auth in user['ssh_auth.absent'] %}
|
||||||
|
ssh_auth_delete_{{ name }}_{{ loop.index0 }}:
|
||||||
|
ssh_auth.absent:
|
||||||
|
- user: {{ name }}
|
||||||
|
- name: {{ auth }}
|
||||||
|
- require:
|
||||||
|
- file: {{ name }}_user
|
||||||
|
- user: {{ name }}_user
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if 'sudouser' in user and user['sudouser'] %}
|
{% if 'sudouser' in user and user['sudouser'] %}
|
||||||
{% if not used_sudo %}
|
{% if not used_sudo %}
|
||||||
|
Loading…
Reference in New Issue
Block a user