Init openldap data
This commit is contained in:
13
ansible/roles/openldap_directory/tasks/ssh_keys.yaml
Normal file
13
ansible/roles/openldap_directory/tasks/ssh_keys.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
- name: Set SSH keys
|
||||
community.general.ldap_attrs:
|
||||
dn: "uid={{ item.uid }},{{ ldap_people_ou }}"
|
||||
state: exact
|
||||
attributes:
|
||||
sshPublicKey: "{{ item.ssh_keys }}"
|
||||
loop: "{{ ldap_users }}"
|
||||
when: item.ssh_keys is defined
|
||||
args:
|
||||
server_uri: "{{ ldap_uri }}"
|
||||
bind_dn: "{{ ldap_admin_dn }}"
|
||||
bind_pw: "{{ ldap_admin_pw }}"
|
||||
start_tls: yes
|
||||
Reference in New Issue
Block a user