debops
debops copied to clipboard
/etc/ssh/ldap_authorized_keys_bindpw contains line break, authentication fails
Hi,
Auto generated passwords https://github.com/debops/debops/blob/c6075e3a4351c5915cde3ec935fb1a856929e358/ansible/roles/sshd/defaults/main.yml#L1008-L1011 contain the line break in the very end and while that should be ok because jinja2 should take care of removing it via https://github.com/debops/debops/blob/master/ansible/roles/sshd/templates/etc/ssh/ldap_authorized_keys_bindpw.j2 - it fails. Resulting in ldapsearch command saying that provided credentials are invalid (via https://github.com/debops/debops/blob/master/ansible/roles/sshd/templates/etc/ssh/authorized_keys_lookup.d/ldap.j2 )
Is it jinja2 bug? Stripping the password from line breaks at ansible controller's side still re-introduces it when it's deployed on target VM.
Thanks
@jo-krk : see #2429