Merge "Fix the copy-build-sshkey role"

This commit is contained in:
Zuul 2018-03-06 19:18:44 +00:00 committed by Gerrit Code Review
commit 90b3f4e6be
1 changed files with 7 additions and 7 deletions

View File

@ -1,13 +1,13 @@
---
# Add the authorization first, to take advantage of manage_dir
- name: Authorize build key
authorized_key:
user: "{{ copy_sshkey_target_user }}"
manage_dir: yes
key: "{{ lookup('file', zuul_temp_ssh_key ~ '.pub') }}"
# 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:
user: "{{ copy_sshkey_target_user }}"
manage_dir: yes
key: "{{ lookup('file', zuul_temp_ssh_key ~ '.pub') }}"
- name: Install the build private key
copy:
src: "{{ zuul_temp_ssh_key }}"