mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-06 15:13:56 +02:00
make the fail message more understandable. Fixes #217
This commit is contained in:
parent
8d21923b70
commit
257be0f395
1 changed files with 14 additions and 10 deletions
|
@ -3,16 +3,20 @@
|
|||
do_token: "{{ do_access_token }}"
|
||||
public_key: "{{ lookup('file', '{{ SSH_keys.public }}') }}"
|
||||
|
||||
- name: "Delete the existing Algo SSH keys"
|
||||
digital_ocean:
|
||||
state: absent
|
||||
command: ssh
|
||||
api_token: "{{ do_access_token }}"
|
||||
name: "{{ SSH_keys.comment }}"
|
||||
register: ssh_keys
|
||||
until: ssh_keys.changed != 1
|
||||
retries: 10
|
||||
delay: 1
|
||||
- block:
|
||||
- name: "Delete the existing Algo SSH keys"
|
||||
digital_ocean:
|
||||
state: absent
|
||||
command: ssh
|
||||
api_token: "{{ do_access_token }}"
|
||||
name: "{{ SSH_keys.comment }}"
|
||||
register: ssh_keys
|
||||
until: ssh_keys.changed != true
|
||||
retries: 10
|
||||
delay: 1
|
||||
rescue:
|
||||
- fail:
|
||||
msg: "Please, ensure that your API token is not read-only."
|
||||
|
||||
- name: "Upload the SSH key"
|
||||
digital_ocean:
|
||||
|
|
Loading…
Add table
Reference in a new issue