Browse Source

added option to remove ssh public keys from auth (ssh_auth.absent)

tags/v0.45.0
7oku 10 years ago
parent
commit
4a8393dca9
2 changed files with 13 additions and 0 deletions
  1. +2
    -0
      pillar.example
  2. +11
    -0
      users/init.sls

+ 2
- 0
pillar.example View File

pubkey: PUBLICKEY pubkey: PUBLICKEY
ssh_auth: ssh_auth:
- PUBLICKEY - PUBLICKEY
ssh_auth.absent:
- PUBLICKEY_TO_BE_REMOVED


## Absent user ## Absent user
cuser: cuser:

+ 11
- 0
users/init.sls View File

{% 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…
Cancel
Save