Merge "Run authorized_keys as root"
This commit is contained in:
commit
702501baa5
@ -1,15 +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') }}"
|
||||
become: true
|
||||
become_user: "{{ copy_sshkey_target_user }}"
|
||||
|
||||
# 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: Get the {{ copy_sshkey_target_user }} user home folder
|
||||
user:
|
||||
name: "{{ copy_sshkey_target_user }}"
|
||||
|
Loading…
Reference in New Issue
Block a user