1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_collection_users.git synced 2024-08-16 10:29:50 +02:00

improve exklusive ssh key mgmnt

This commit is contained in:
L3D 2024-04-09 18:27:39 +02:00
parent 90951ae335
commit 1c4c90c51f
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 3 additions and 2 deletions

View file

@ -5,7 +5,7 @@
user: "{{ user.name }}" user: "{{ user.name }}"
state: 'present' state: 'present'
key: "{{ user.pubkeys | default() }}" key: "{{ user.pubkeys | default() }}"
exclusive: true exclusive: "{{ user.exklusive_pubkeys | default(true) }}"
loop: "{{ _l3d_users__merged_users }}" loop: "{{ _l3d_users__merged_users }}"
loop_control: loop_control:
label: "user={{ user.name }}" label: "user={{ user.name }}"

View file

@ -31,6 +31,7 @@
user: 'ansible' user: 'ansible'
state: "{{ l3d_users__ansible_user_state | ternary('present', 'absent') }}" state: "{{ l3d_users__ansible_user_state | ternary('present', 'absent') }}"
key: "{{ user.pubkeys | default() }}" key: "{{ user.pubkeys | default() }}"
exclusive: false
loop: "{{ _l3d_users__merged_users }}" loop: "{{ _l3d_users__merged_users }}"
when: user.admin | default(false) | bool and user.admin_ansible_login | default(true) | bool when: user.admin | default(false) | bool and user.admin_ansible_login | default(true) | bool
loop_control: loop_control:

View file

@ -1,3 +1,3 @@
--- ---
playbook_version_number: 11 playbook_version_number: 12
playbook_version_path: 'l3d.users.user.version' playbook_version_path: 'l3d.users.user.version'