From 9211432515ed1598bd1d75a05a019d302e97658c Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Fri, 31 Mar 2023 16:00:24 +0200 Subject: [PATCH] password can be generated --- tasks/ldap_user_inc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ldap_user_inc.yml b/tasks/ldap_user_inc.yml index 9f326b4..9ea03cc 100644 --- a/tasks/ldap_user_inc.yml +++ b/tasks/ldap_user_inc.yml @@ -13,7 +13,7 @@ firstname: "{{ item.firstname }}" lastname: "{{ item.lastname }}" email: "{{ item.email }}" - password: "{{ item.password }}" + password: "{{ (item.password=='')| ternary(lookup('community.general.random_string', min_lower=1, min_upper=1, min_special=1, min_numeric=1, length=14), item.password ) }}" community.general.ldap_entry: bind_dn: "{{ binddn }}" bind_pw: "{{ bindpwd }}"