Skip to content

Commit

Permalink
playbooks/usermgmt: Add workaround for SSH pub keys with spaces in co…
Browse files Browse the repository at this point in the history
…mment (2)

Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Jul 17, 2024
1 parent 45f19c6 commit e80fd5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/playbooks/usermgmt/tasks/add-user-ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Ugly workaround for yet-to-be-investigated upstream(?) issue that breaks
# execution if there are spaces in key file comments.
# -> Take first key and use first 3 fields only, i.e., omit spaces in comment.
sshpubkey: "{{ [item['value']['ssh_public_key'][0].split()[:3] | join(' ')] if item['value']['ssh_public_key'] else [] }}"
sshpubkey: "{{ [item['value']['ssh_public_key'][0].split()[:3] | join(' ')] if item['value']['ssh_public_key'] | default([]) else [] }}"
# sshpubkey: "{{ item['value']['ssh_public_key'] | default([]) }}"
validate_certs: false
state: "{{ item['value']['desired_state'] | default('present') }}"
Expand Down

0 comments on commit e80fd5d

Please sign in to comment.