mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 07:33:52 +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 }}"
|
do_token: "{{ do_access_token }}"
|
||||||
public_key: "{{ lookup('file', '{{ SSH_keys.public }}') }}"
|
public_key: "{{ lookup('file', '{{ SSH_keys.public }}') }}"
|
||||||
|
|
||||||
- name: "Delete the existing Algo SSH keys"
|
- block:
|
||||||
digital_ocean:
|
- name: "Delete the existing Algo SSH keys"
|
||||||
state: absent
|
digital_ocean:
|
||||||
command: ssh
|
state: absent
|
||||||
api_token: "{{ do_access_token }}"
|
command: ssh
|
||||||
name: "{{ SSH_keys.comment }}"
|
api_token: "{{ do_access_token }}"
|
||||||
register: ssh_keys
|
name: "{{ SSH_keys.comment }}"
|
||||||
until: ssh_keys.changed != 1
|
register: ssh_keys
|
||||||
retries: 10
|
until: ssh_keys.changed != true
|
||||||
delay: 1
|
retries: 10
|
||||||
|
delay: 1
|
||||||
|
rescue:
|
||||||
|
- fail:
|
||||||
|
msg: "Please, ensure that your API token is not read-only."
|
||||||
|
|
||||||
- name: "Upload the SSH key"
|
- name: "Upload the SSH key"
|
||||||
digital_ocean:
|
digital_ocean:
|
||||||
|
|
Loading…
Add table
Reference in a new issue