From 840b39d810cd52d2bcd03dcd3f92a1e0d5cbc7a3 Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 6 May 2015 09:44:22 +0200 Subject: [PATCH] Ignore errors from autoremove and autoclean If apt is locked in "autoremove and autoclean " dont panic just ignore errors its not vital and ansible should not fail. wait for next run --- tasks/apt.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/apt.yml b/tasks/apt.yml index 24060c8..3a80a33 100644 --- a/tasks/apt.yml +++ b/tasks/apt.yml @@ -36,12 +36,14 @@ when: apt_autoremove register: apt_autoremove_var changed_when: "'Removing' in apt_autoremove_var.stdout" + ignore_errors: yes - name: APT | Clear local repository of retrieved package files shell: apt-get -y autoclean when: apt_autoclean register: apt_autoclean_var changed_when: "'Del' in apt_autoclean_var.stdout" + ignore_errors: yes - name: APT | Ensure the apt configuration in /etc/apt/apt.conf.ds/99customsettings is updated template: