Pass ssh host key to upload-git-mirror for integration tests
We're adding a git_mirror_credentials.host_key variable and we're renaming git_mirror_credentials.key to git_mirror_credentials.ssh_key. We need the integration tests to support both formats while we undergo these changes in order to keep the tests green. Change-Id: Ia6e0f5b3972ecffae517eaec0e3531b8fb376bad
This commit is contained in:
parent
063301e3db
commit
6c843d976f
@ -29,8 +29,9 @@
|
|||||||
state: present
|
state: present
|
||||||
key: "{{ public_key_contents.stdout }}"
|
key: "{{ public_key_contents.stdout }}"
|
||||||
|
|
||||||
- name: Add localhost to known_hosts
|
- name: Get localhost ssh host public key
|
||||||
shell: ssh-keyscan -H localhost >> {{ ansible_user_dir }}/.ssh/known_hosts
|
shell: ssh-keyscan -t rsa localhost
|
||||||
|
register: host_key
|
||||||
tasks:
|
tasks:
|
||||||
- name: Get git commit hash for current patch of zuul-jobs
|
- name: Get git commit hash for current patch of zuul-jobs
|
||||||
command: git rev-parse HEAD
|
command: git rev-parse HEAD
|
||||||
@ -56,6 +57,10 @@
|
|||||||
git_mirror_credentials:
|
git_mirror_credentials:
|
||||||
user: "{{ ansible_user }}"
|
user: "{{ ansible_user }}"
|
||||||
host: localhost
|
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 }}"
|
key: "{{ private_key_contents.stdout }}"
|
||||||
git_mirror_repository: "{{ test_repo_path }}"
|
git_mirror_repository: "{{ test_repo_path }}"
|
||||||
include_role:
|
include_role:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user