Fix some errors with the replace-keys role

The stat module requires a path argument.
We want to use the -D argument to ssh-add which means 'delete all
identities', not -d which means 'delete the default identities'.

Change-Id: I04dc8d409ec0d315a055fed2615acb400310c866
This commit is contained in:
James E. Blair 2017-06-30 17:32:36 -07:00
parent d002b51c17
commit 757ec08ddb
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@
key: "{{ lookup('file', zuul_temp_ssh_key + '.pub') }}"
- name: Remove all keys from local agent
command: ssh-add -d
command: ssh-add -D
delegate_to: localhost
- name: Add back temp key

View File

@ -1,5 +1,6 @@
- name: Check to see if ssh key was already created for this build
stat: "{{ zuul_temp_ssh_key }}"
stat:
path: "{{ zuul_temp_ssh_key }}"
register: zuul_temp_ssh_key_stat
delegate_to: localhost
failed_when: false