feat: set exclusive option for ssh keys
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
19a41eb843
commit
992c239b08
@ -6,7 +6,8 @@ users_default_users: []
|
|||||||
# groups:
|
# groups:
|
||||||
# - wheel
|
# - wheel
|
||||||
# password: "secure"
|
# password: "secure"
|
||||||
# key: "ssh-ed25519 AAAA..."
|
# sshkeys:
|
||||||
|
# - "ssh-ed25519 AAAA..."
|
||||||
# shell: /bin/bash
|
# shell: /bin/bash
|
||||||
# @end
|
# @end
|
||||||
|
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
- name: Set authorized_key for ssh users
|
- name: Set authorized_key for ssh users
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "{{ item.name }}"
|
user: "{{ item.name }}"
|
||||||
key: "{{ item.key }}"
|
key: "{{ item.sshkeys }}"
|
||||||
|
exclusive: True
|
||||||
state: present
|
state: present
|
||||||
loop: "{{ users_default_users }}"
|
loop: "{{ users_default_users }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
when: item.key is defined
|
when: item.sshkeys is defined
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
Loading…
Reference in New Issue
Block a user