roles/wazuh-agent: remove async from install task and introduce a lock timeout configurable by wazuh_agent_yum_lock_timeout

This commit is contained in:
neonmei 2020-11-20 12:37:20 -03:00
parent 7dc67986d4
commit 7fc29b720f
No known key found for this signature in database
GPG Key ID: 7EA1832E7E17237E
2 changed files with 3 additions and 2 deletions

View File

@ -32,6 +32,8 @@ wazuh_agent_sources_installation:
user_agent_config_profile: null user_agent_config_profile: null
user_ca_store: "/var/ossec/wpk_root.pem" user_ca_store: "/var/ossec/wpk_root.pem"
wazuh_agent_yum_lock_timeout: 30
wazuh_api_reachable_from_agent: false wazuh_api_reachable_from_agent: false
wazuh_profile_centos: 'centos, centos7, centos7.6' wazuh_profile_centos: 'centos, centos7, centos7.6'
wazuh_profile_ubuntu: 'ubuntu, ubuntu18, ubuntu18.04' wazuh_profile_ubuntu: 'ubuntu, ubuntu18, ubuntu18.04'

View File

@ -22,8 +22,7 @@
yum: yum:
name: wazuh-agent-{{ wazuh_agent_version }} name: wazuh-agent-{{ wazuh_agent_version }}
state: present state: present
async: 90 lock_timeout: '{{ wazuh_agent_yum_lock_timeout }}'
poll: 30
when: when:
- ansible_os_family|lower == "redhat" - ansible_os_family|lower == "redhat"
- not wazuh_agent_sources_installation.enabled - not wazuh_agent_sources_installation.enabled