From efdff890eda8bad1463930bfe6bd1a51b226c90b Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Mon, 19 Jan 2026 11:13:57 +0100 Subject: [PATCH] Introduce a timeout for package installation Sometimes package installations can get into weird state and stuck for a very long time. Timeout the tasks to fail early, with a customizable timeout duration. --- roles/system_packages/defaults/main.yml | 1 + roles/system_packages/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/system_packages/defaults/main.yml b/roles/system_packages/defaults/main.yml index 62704067a..79c9836a4 100644 --- a/roles/system_packages/defaults/main.yml +++ b/roles/system_packages/defaults/main.yml @@ -1,4 +1,5 @@ --- # number of times package install task should be retried pkg_install_retries: 4 +pkg_install_timeout: "{{ 5 * 60 }}" yum_repo_dir: /etc/yum.repos.d diff --git a/roles/system_packages/tasks/main.yml b/roles/system_packages/tasks/main.yml index f0bc875df..ebb98147a 100644 --- a/roles/system_packages/tasks/main.yml +++ b/roles/system_packages/tasks/main.yml @@ -63,3 +63,4 @@ label: "{{ item.action_label }}" tags: - bootstrap_os + timeout: "{{ pkg_install_timeout }}"