Make sure authorized_keys is not altered during a job
Change-Id: I5086fc7004c24813e4dae5a4c12037f237502d27
This commit is contained in:
parent
a9f6ab15e3
commit
d0a2a2e398
|
@ -1,3 +1,8 @@
|
||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- remove-build-sshkey
|
- 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"
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
- hosts: all
|
- 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:
|
roles:
|
||||||
- add-build-sshkey
|
- add-build-sshkey
|
||||||
- prepare-workspace
|
- prepare-workspace
|
||||||
|
|
Loading…
Reference in New Issue