From 97e807f7d546cdda761b32a94969a8397d2936fd Mon Sep 17 00:00:00 2001 From: Jeroen Vermeulen Date: Sat, 1 Jun 2024 17:14:30 +0200 Subject: [PATCH] Added 10 retries reverted change to zabbix_agent_listenport in roles/zabbix_agent/tasks/main.yml --- roles/zabbix_agent/tasks/api.yml | 3 +++ roles/zabbix_agent/tasks/main.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/zabbix_agent/tasks/api.yml b/roles/zabbix_agent/tasks/api.yml index cd8a46e94..775c7e89c 100644 --- a/roles/zabbix_agent/tasks/api.yml +++ b/roles/zabbix_agent/tasks/api.yml @@ -7,6 +7,7 @@ - zabbix_api_create_hostgroup | bool register: zabbix_api_hostgroup_created until: zabbix_api_hostgroup_created is succeeded + retries: 10 delegate_to: "{{ zabbix_api_server_host }}" tags: - api @@ -38,6 +39,7 @@ tags: "{{ zabbix_agent_tags | default(omit) }}" register: zabbix_api_host_created until: zabbix_api_host_created is succeeded + retries: 10 delegate_to: "{{ zabbix_api_server_host }}" changed_when: false tags: @@ -54,6 +56,7 @@ - item.macro_key is defined register: zabbix_api_hostmarcro_created until: zabbix_api_hostmarcro_created is succeeded + retries: 10 delegate_to: "{{ zabbix_api_server_host }}" tags: - api diff --git a/roles/zabbix_agent/tasks/main.yml b/roles/zabbix_agent/tasks/main.yml index a30b157ca..e28348f28 100644 --- a/roles/zabbix_agent/tasks/main.yml +++ b/roles/zabbix_agent/tasks/main.yml @@ -43,7 +43,7 @@ zabbix_agent_heartbeatfrequency: "{{ zabbix_agent_heartbeatfrequency is defined | ternary(zabbix_agent_heartbeatfrequency, zabbix_agent2_heartbeatfrequency) | default(60) }}" zabbix_agent_hostname: "{{ zabbix_agent_hostname is defined | ternary(zabbix_agent_hostname, zabbix_agent2_hostname) | default(inventory_hostname) }}" zabbix_agent_include_mode: "{{ zabbix_agent_include_mode is defined | ternary(zabbix_agent_include_mode, zabbix_agent2_include_mode) | default('0750') }}" - zabbix_agent_listenport: "{{ zabbix_agent_listenport | default(zabbix_agent2_listenport) | default(10050) }}" + zabbix_agent_listenport: "{{ zabbix_agent_listenport is defined | ternary(zabbix_agent_listenport, zabbix_agent2_listenport) | default(10050) }}" zabbix_agent_logfilesize: "{{ zabbix_agent_logfilesize is defined | ternary(zabbix_agent_logfilesize, zabbix_agent2_logfilesize) | default(100) }}" zabbix_agent_logtype: "{{ zabbix_agent_logtype is defined | ternary(zabbix_agent_logtype, zabbix_agent2_logtype) | default('file') }}" zabbix_agent_persistentbufferperiod: "{{ zabbix_agent_persistentbufferperiod is defined | ternary(zabbix_agent_persistentbufferperiod, zabbix_agent2_persistentbufferperiod) | default('1h') }}"