From 804a6bf5f285d9309ab8e1c25f43d90033cb302a Mon Sep 17 00:00:00 2001 From: David Galloway Date: Wed, 7 Apr 2021 11:35:22 -0400 Subject: [PATCH] ansible: Remove unattended-upgrades after package install One of the packages we *do* want to install (software-properties-common maybe) pulls in unattended upgrades. It's not a strict dependency so we can remove it after package install. It's the only package that gets removed. Signed-off-by: David Galloway --- ansible/examples/slave.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/examples/slave.yml b/ansible/examples/slave.yml index 22777408..7337af04 100644 --- a/ansible/examples/slave.yml +++ b/ansible/examples/slave.yml @@ -351,13 +351,6 @@ failed_when: false when: ansible_os_family == "Suse" - # Sometimes, slaves would connect to Jenkins and try to run an apt transaction right away. Except apt-daily/unattended-upgrades has the dpkg lock so the Jenkins job would fail. - - name: Uninstall unattended-upgrades - package: - name: unattended-upgrades - state: absent - when: ansible_os_family == "Debian" - - name: Stop and disable daily apt activities command: "{{ item }}" with_items: @@ -402,6 +395,13 @@ update_cache: yes when: ansible_os_family == "Debian" + # Sometimes, slaves would connect to Jenkins and try to run an apt transaction right away. Except apt-daily/unattended-upgrades has the dpkg lock so the Jenkins job would fail. + - name: Uninstall unattended-upgrades + package: + name: unattended-upgrades + state: absent + when: ansible_os_family == "Debian" + - name: Install EPEL repo yum: name: epel-release -- 2.39.5