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 }}"