Skip to content

Commit f7351b2

Browse files
authored
ansible: write known_hosts entry for binary_tmp (#4051)
Add a `known_hosts` entry to allow the machines running the arm-fanned jobs to be able to reach the `binary_tmp` git repository over ssh. Fixes: #3680
1 parent b3935fc commit f7351b2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
|1|RV0GwLebKrcRLruG88I/orbmg6Y=|dlBrqkgVnCQwmAOFNylzKj3M2E0= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNWFPALrB+TJ1XSdEcL+0LApTQKaTWG2MDsdeMbT852

ansible/roles/github/tasks/main.yml

+13
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@
2828
become: yes
2929
become_user: "{{ server_user }}"
3030
loop: "{{ lookup('file', 'files/github_bad_hosts').splitlines() }}"
31+
32+
# Entries in `files/binary_tmp_known_hosts` are generated via
33+
# `ssh-keyscan -H -t ed25519 <host>`, where `<host>` should match
34+
# the `TEMP_REPO_SERVER` environment variable set in Jenkins.
35+
- name: add binary_tmp entry in known_hosts
36+
ansible.builtin.lineinfile:
37+
path: "{{ user_home_dir }}/.ssh/known_hosts"
38+
line: "{{ item }}"
39+
state: present
40+
become: yes
41+
become_user: "{{ server_user }}"
42+
loop: "{{ lookup('file', 'files/binary_tmp_known_hosts').splitlines() }}"
43+
when: (user_home_dir.find('_arm_cross') != -1) or (user_home_dir.find('armv7l') != -1)

0 commit comments

Comments
 (0)