Factor out password store retrieval
This commit is contained in:
parent
973522c373
commit
f10d94612f
7 changed files with 18 additions and 21 deletions
|
@ -6,11 +6,11 @@ import re
|
|||
|
||||
import ldap3
|
||||
|
||||
{% set password = lookup('passwordstore', "cluster/"+cluster.name, returnall=true) | from_yaml %}
|
||||
{% set cluster_password = lookup('passwordstore', "cluster/"+cluster.name, returnall=true) | from_yaml %}
|
||||
realm = '{{ hostvars[inventory_hostname]["sync-ldap"] }}'
|
||||
ldap_host = '{{ domain }}'
|
||||
ldap_user = '{{ password.ldap_user }}'
|
||||
ldap_pass = '{{ password.ldap_pass }}'
|
||||
ldap_user = '{{ cluster_password.ldap_user }}'
|
||||
ldap_pass = '{{ cluster_password.ldap_pass }}'
|
||||
ldap_base = '{{ domain | split(".") | map("regex_replace", "^", "dc=") | join(",") }}'
|
||||
|
||||
# build LDAP query for users
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue