make the fail message more understandable. Fixes #217

pull/242/head
Jack Ivanov 8 years ago
parent 8d21923b70
commit 257be0f395

@ -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…
Cancel
Save