diff --git a/playbooks/base/cleanup.yaml b/playbooks/base/cleanup.yaml index d793838..47f83fe 100644 --- a/playbooks/base/cleanup.yaml +++ b/playbooks/base/cleanup.yaml @@ -1,3 +1,8 @@ - hosts: all roles: - remove-build-sshkey + tasks: + - name: Reinstall saved authorized_keys + copy: + src: "{{ zuul.executor.work_root }}/{{ inventory_hostname }}_authorized_keys" + dest: "{{ ansible_user_dir }}/.ssh/authorized_keys" diff --git a/playbooks/base/pre.yaml b/playbooks/base/pre.yaml index 0d1ed4b..8e53785 100644 --- a/playbooks/base/pre.yaml +++ b/playbooks/base/pre.yaml @@ -1,4 +1,9 @@ - hosts: all + pre_tasks: + - name: Save authorized_keys + fetch: + src: "{{ ansible_user_dir }}/.ssh/authorized_keys" + dest: "{{ zuul.executor.work_root }}/{{ inventory_hostname }}_authorized_keys" roles: - add-build-sshkey - prepare-workspace