31 lines
926 B
YAML
31 lines
926 B
YAML
|
|
||
|
- name: Recherche des utilisateurs
|
||
|
delegate_to: localhost
|
||
|
community.general.ldap_search:
|
||
|
server_uri: "{{ docker_webfingerserver_ldap_server_uri }}"
|
||
|
bind_dn: "{{ docker_webfingerserver_ldap_bind_dn }}"
|
||
|
bind_pw: "{{ docker_webfingerserver_ldap_bind_pw }}"
|
||
|
dn: "{{ docker_webfingerserver_ldap_usersdn }}"
|
||
|
filter: "{{ docker_webfingerserver_ldap_users_filter }}"
|
||
|
scope: onelevel
|
||
|
attrs:
|
||
|
- uid
|
||
|
- mail
|
||
|
- memberOf
|
||
|
- displayName
|
||
|
- givenName
|
||
|
- sn
|
||
|
register: ldap_users
|
||
|
|
||
|
- debug:
|
||
|
var: ldap_users.results
|
||
|
|
||
|
- name: creation entree webfinger depuis template
|
||
|
template:
|
||
|
src: user-template.json
|
||
|
dest: "{{ docker_webfingerserver_data_dir }}/{{ docker_webfingerserver_service_id }}/webfinger/.well-known/webfinger/store/{{ docker_webfingerserver_local_domain }}/{{ item.uid }}.json"
|
||
|
with_items:
|
||
|
- "{{ ldap_users.results }}"
|
||
|
vars:
|
||
|
user: "{{ item }}"
|