From 1e696ce2be604391e2b181e586f76677ce52f568 Mon Sep 17 00:00:00 2001 From: Charlie O'Keefe Date: Thu, 12 Apr 2018 14:04:42 -0600 Subject: [PATCH] Use 'shell' ansible module in place of 'command' This is a compound command, piping the output of a call to gpg2 to the input of a call to grep. This is the type of instruction that requires a shell to interpret, so use the 'shell' module. --- roles/gitian/tasks/gpg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/gitian/tasks/gpg.yml b/roles/gitian/tasks/gpg.yml index 7062f2c..72d59a7 100644 --- a/roles/gitian/tasks/gpg.yml +++ b/roles/gitian/tasks/gpg.yml @@ -1,6 +1,6 @@ --- - name: Check that the secret key exists. - local_action: "command gpg2 --list-secret-keys | grep {{ gpg_key_id }}" + local_action: "shell gpg2 --list-secret-keys | grep {{ gpg_key_id }}" register: gpg_list_keys_result environment: GNUPGHOME: "{{ lookup('env', 'HOME') }}/.gnupg"