From a678196b2ca14a3df85afdb34af28fa0f102d946 Mon Sep 17 00:00:00 2001 From: Kyle Laker Date: Sat, 28 Aug 2021 21:38:04 -0400 Subject: [PATCH] Resolve ignore-errors lint warnings This uses the apt lock workaround to replace an ignore_errors on update and also just totally removes another ignore_errors for writing to the .bashrcs of users. If that's failing, we probably need to make our filter a bit better. --- roles/common/tasks/main.yml | 5 +++-- roles/user/tasks/main.yml | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 2d7d36a0..aef48d60 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -64,5 +64,6 @@ - name: Refresh apt cache apt: update_cache: yes - changed_when: false - ignore_errors: yes + register: apt_update + retries: 100 + until: apt_update is success or ('Failed to lock apt for exclusive operation' not in apt_update.msg and '/var/lib/dpkg/lock' not in apt_update.msg) \ No newline at end of file diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml index 02372bb8..dc6e9182 100644 --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -92,7 +92,6 @@ # sources our profile. We won't create the file if it doesn't exist and # we can ignore any errors create: no - ignore_errors: yes loop: "{{ real_users }}" - name: Remove Timeshift warning dconf: