upload-git-mirror: fix ssh key newline
I don't think this testing has been run of Focal before, and the ssh there is more picky about trailing newlines in the ssh private key. Ensure it has a newline to avoid problems. While we're here, clean up an old unused argument Change-Id: If300083b9bc8e5538dcb1eeeaa896ba22c21232e
This commit is contained in:
parent
95d53aa40e
commit
0956167b8c
@ -10,6 +10,12 @@
|
||||
dest: "{{ ssh_private_key_tmp.path }}"
|
||||
mode: 0600
|
||||
|
||||
# If the markers in an id_rsa don't end with a newline some
|
||||
# versions of ssh won't read the key.
|
||||
- name: Ensure ssh_key ends with newline
|
||||
shell: |
|
||||
echo >> {{ ssh_private_key_tmp.path }}
|
||||
|
||||
- name: Generate SSH configuration
|
||||
set_fact:
|
||||
ssh_config: |
|
||||
|
@ -62,9 +62,6 @@
|
||||
host: localhost
|
||||
ssh_key: "{{ private_key_contents.stdout }}"
|
||||
host_key: "{{ host_key.stdout }}"
|
||||
# TODO: key is renamed to ssh_key to prevent ambiguity with host_key.
|
||||
# Remove key when the rename has landed in the role.
|
||||
key: "{{ private_key_contents.stdout }}"
|
||||
git_mirror_repository: "{{ test_repo_path }}"
|
||||
include_role:
|
||||
name: upload-git-mirror
|
||||
|
Loading…
Reference in New Issue
Block a user