From ed4fec84626d86f2703e843c65eec08ab89ee0c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorben=20G=C3=BCnther?= <admin@xenrox.net>
Date: Thu, 15 Jul 2021 23:54:27 +0200
Subject: [PATCH] install_arch: Use shell instead of command

shell is like command but runs the command through a shell, so that
piping will work.
---
 roles/install_arch/tasks/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/install_arch/tasks/main.yml b/roles/install_arch/tasks/main.yml
index bf8c3838a..c9a4f74aa 100644
--- a/roles/install_arch/tasks/main.yml
+++ b/roles/install_arch/tasks/main.yml
@@ -165,7 +165,7 @@
   template: src=sshd_config.j2 dest=/mnt/etc/ssh/sshd_config owner=root group=root mode=0644
 
 - name: clean pacman cache
-  command: yes | chroot /mnt pacman -Scc
+  shell: set -o pipefail && yes | chroot /mnt pacman -Scc
   register: chroot_pacman_clean_cache
   changed_when: "chroot_pacman_clean_cache.rc == 0"
 
-- 
GitLab