From b8f3d43eee28d25b30bd6d1afd2056634a18efe0 Mon Sep 17 00:00:00 2001 From: Jack Ivanov Date: Thu, 23 Feb 2017 19:22:18 +0300 Subject: [PATCH] enable some additional debug info --- roles/cloud-digitalocean/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/cloud-digitalocean/tasks/main.yml b/roles/cloud-digitalocean/tasks/main.yml index e456374..a4002bd 100644 --- a/roles/cloud-digitalocean/tasks/main.yml +++ b/roles/cloud-digitalocean/tasks/main.yml @@ -14,7 +14,19 @@ until: ssh_keys.changed != true retries: 10 delay: 1 + rescue: + - name: Collect the fail error + digital_ocean: + state: absent + command: ssh + api_token: "{{ do_access_token }}" + name: "{{ SSH_keys.comment }}" + register: ssh_keys + ignore_errors: yes + + - debug: var=ssh_keys + - fail: msg: "Please, ensure that your API token is not read-only."