From 6e99c732e91f4f859c8f6769f96caa28f0329a7b Mon Sep 17 00:00:00 2001 From: Charlie O'Keefe Date: Thu, 12 Apr 2018 14:19:22 -0600 Subject: [PATCH] ignore errors on 'Check that the secret key exists' task If the grep for gpg_key_id fails to match we will have an exit code of 1 which by default will cause the task to fail. According to the README, using a gpg key is considered optional. So we don't want the build to halt in this case. --- roles/gitian/tasks/gpg.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/gitian/tasks/gpg.yml b/roles/gitian/tasks/gpg.yml index 86bd0dd..b159c53 100644 --- a/roles/gitian/tasks/gpg.yml +++ b/roles/gitian/tasks/gpg.yml @@ -1,6 +1,7 @@ --- - name: Check that the secret key exists. local_action: "shell gpg2 --list-secret-keys --with-colons | grep {{ gpg_key_id }}" + ignore_errors: true register: gpg_list_keys_result environment: GNUPGHOME: "{{ lookup('env', 'HOME') }}/.gnupg"