Add lock_timeout to yum tasks for improved package installation reliability

This commit is contained in:
Jesus Garcia 2025-01-17 08:11:12 -05:00
parent 194d5d168a
commit 7f1579dcd1
No known key found for this signature in database
GPG Key ID: 8461CA78326C96C9
6 changed files with 13 additions and 4 deletions

View File

@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file.
### Changed
- None
- Add Yum lock timeout to Ansible task ([#1511](https://github.com/wazuh/wazuh-ansible/pull/1511))
### Fixed

View File

@ -17,6 +17,7 @@
yum:
name: "filebeat-{{ filebeat_version }}"
state: present
lock_timeout: 200
register: install
tags:
- install

View File

@ -11,6 +11,7 @@
yum:
name: "{{ wazuh_custom_packages_installation_agent_rpm_url }}"
state: present
lock_timeout: 200
when:
- ansible_os_family|lower == "redhat"
- wazuh_custom_packages_installation_agent_enabled

View File

@ -62,7 +62,10 @@
- wazuh_manager_config.cluster.disable != 'yes'
- name: RedHat/CentOS/Fedora | Install OpenJDK 1.8
yum: name=java-1.8.0-openjdk state=present
yum:
name: java-1.8.0-openjdk
state: present
lock_timeout: 200
when:
- wazuh_manager_config.cis_cat.disable == 'no'
- wazuh_manager_config.cis_cat.install_java == 'yes'

View File

@ -14,6 +14,7 @@
yum:
name: "{{ wazuh_custom_packages_installation_manager_rpm_url }}"
state: present
lock_timeout: 200
when:
- wazuh_custom_packages_installation_manager_enabled
- not (ansible_distribution|lower == "centos" and ansible_distribution_major_version >= "8")

View File

@ -18,6 +18,7 @@
yum:
name: amazon-linux-extras
state: present
lock_timeout: 200
when:
- ansible_distribution == 'Amazon'
- ansible_distribution_major_version == '2'
@ -40,6 +41,8 @@
- name: RedHat/CentOS/Fedora | Install Indexer dependencies
yum:
name: "{{ packages }}"
state: present
lock_timeout: 200
vars:
packages:
- wget