Skip to content

ansible: write known_hosts entry for binary_tmp #4051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ansible/roles/github/files/binary_tmp_known_hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|1|RV0GwLebKrcRLruG88I/orbmg6Y=|dlBrqkgVnCQwmAOFNylzKj3M2E0= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDNWFPALrB+TJ1XSdEcL+0LApTQKaTWG2MDsdeMbT852
13 changes: 13 additions & 0 deletions ansible/roles/github/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@
become: yes
become_user: "{{ server_user }}"
loop: "{{ lookup('file', 'files/github_bad_hosts').splitlines() }}"

# Entries in `files/binary_tmp_known_hosts` are generated via
# `ssh-keyscan -H -t ed25519 <host>`, where `<host>` should match
# the `TEMP_REPO_SERVER` environment variable set in Jenkins.
- name: add binary_tmp entry in known_hosts
ansible.builtin.lineinfile:
path: "{{ user_home_dir }}/.ssh/known_hosts"
line: "{{ item }}"
state: present
become: yes
become_user: "{{ server_user }}"
loop: "{{ lookup('file', 'files/binary_tmp_known_hosts').splitlines() }}"
when: (user_home_dir.find('_arm_cross') != -1) or (user_home_dir.find('armv7l') != -1)
Loading