run-base : don't strip root ssh private key

Builds running on the new container-based executors started failing to
connect to remote hosts with

 Load key "/root/.ssh/id_rsa": invalid format

It turns out the new executor is writing keys in OpenSSH format,
rather than the older PEM format.  And it seems that the OpenSSH
format is more picky about having a trailing space after the

 -----END OPENSSH PRIVATE KEY-----

bit of the id_rsa file.  By default, the file lookup runs an rstrip on
the incoming file to remove the trailing space.  Turn that off so we
generate a valid key.

Change-Id: I49bb255f359bd595e1b88eda890d04cb18205b6e
This commit is contained in:
Ian Wienand 2020-07-14 13:13:13 +10:00
parent 5c7804d4a5
commit c697f22413
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
- import_playbook: ../install-ansible.yaml
vars:
root_rsa_key: "{{ lookup('file', zuul.executor.work_root + '/' + zuul.build + '_id_rsa') }}"
root_rsa_key: "{{ lookup('file', zuul.executor.work_root + '/' + zuul.build + '_id_rsa', rstrip=False) }}"
ansible_cron_disable_job: true
cloud_launcher_disable_job: true