Fix the copy-build-sshkey role

Run the first task in the block, with become_user since the zuul
user may not access a generic use .ssh folder.

Depends-on: https://review.openstack.org/550091

Change-Id: I4ce120412079fe92502eee5310a03664aa55d5ce
This commit is contained in:
David Moreau Simard 2018-02-26 10:08:30 -05:00 committed by Andrea Frittoli
parent ace4db4b04
commit 85c7ff6989

View File

@ -1,4 +1,6 @@
---
# Use a block to add become to a set of tasks
- block:
# Add the authorization first, to take advantage of manage_dir
- name: Authorize build key
authorized_key:
@ -6,8 +8,6 @@
manage_dir: yes
key: "{{ lookup('file', zuul_temp_ssh_key ~ '.pub') }}"
# Use a block to add become to a set of tasks
- block:
- name: Install the build private key
copy:
src: "{{ zuul_temp_ssh_key }}"