From 3a501eed400bedf6f3dfa4e4d66e26483d6791fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorben=20G=C3=BCnther?= <admin@xenrox.net>
Date: Tue, 6 Jul 2021 19:37:31 +0200
Subject: [PATCH] install_arch: Fix cleanup of pacman cache

noconfirm does not work because the default answer to the first check is
`No`.
---
 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 0b384d130..2f416a5d3 100644
--- a/roles/install_arch/tasks/main.yml
+++ b/roles/install_arch/tasks/main.yml
@@ -184,7 +184,7 @@
   file: src=/run/systemd/resolve/stub-resolv.conf dest=/mnt/etc/resolv.conf state=link force=yes owner=root group=root mode=0644
 
 - name: clean pacman cache
-  command: chroot /mnt pacman -Scc --noconfirm
+  command: yes | chroot /mnt pacman -Scc
   register: chroot_pacman_clean_cache
   changed_when: "chroot_pacman_clean_cache.rc == 0"
 
-- 
GitLab