From 5afc0f8ab487e31047c3c1f7013f66025aeb1cdd Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 21 Mar 2019 07:11:14 -0500 Subject: [PATCH] Fixes ansible-lint failure on shell task without pipefail. --- tasks/setup-Debian.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 23a49ae..eaaa96f 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -26,7 +26,9 @@ when: add_repository_key is failed - name: Add Docker apt key (alternative for older systems without SNI). - shell: "curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -" + shell: | + set -o pipefail + curl -sSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - args: warn: false when: add_repository_key is failed