Merge "Install build private key too"
This commit is contained in:
commit
aff535f1f7
@ -3,12 +3,32 @@
|
||||
delegate_to: localhost
|
||||
run_once: true
|
||||
|
||||
- name: Distribute it to all nodes
|
||||
- name: Enable access via build key on all nodes
|
||||
authorized_key:
|
||||
user: "{{ ansible_ssh_user }}"
|
||||
state: present
|
||||
key: "{{ lookup('file', zuul_temp_ssh_key + '.pub') }}"
|
||||
|
||||
- name: Make sure user has a .ssh
|
||||
file:
|
||||
state: directory
|
||||
path: "~/.ssh"
|
||||
mode: 0700
|
||||
|
||||
- name: Install build private key as SSH key on all nodes
|
||||
copy:
|
||||
src: "{{ zuul_temp_ssh_key }}"
|
||||
dest: "~/.ssh/id_rsa"
|
||||
mode: 0600
|
||||
force: no
|
||||
|
||||
- name: Install build public key as SSH key on all nodes
|
||||
copy:
|
||||
src: "{{ zuul_temp_ssh_key }}.pub"
|
||||
dest: "~/.ssh/id_rsa.pub"
|
||||
mode: 0644
|
||||
force: no
|
||||
|
||||
- name: Remove all keys from local agent
|
||||
command: ssh-add -D
|
||||
delegate_to: localhost
|
||||
|
Loading…
x
Reference in New Issue
Block a user