Skip to content

Commit

Permalink
troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrodie18 committed Jun 12, 2024
1 parent 16b50af commit e7364ba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
21 changes: 1 addition & 20 deletions roles/zabbix_agent/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,7 @@
# handlers file for zabbix-agent

- name: restart zabbix-agent
block:
- name: "Make sure the zabbix-agent service is running"
ansible.builtin.service:
name: "{{ zabbix_agent_service }}"
state: started
enabled: true
become: true
when:
- not (zabbix_agent_docker | bool)
tags:
- service
rescue:
- name: get results
shell:
cmd: journalctl -xe
register: _res

- debug:
var: _res.content | b64decode
- fail:
include_tasks: tmp.yml
# when:
# - not zabbix_agent_docker
# - ansible_os_family != "Windows" and ansible_os_family != "Darwin"
Expand Down
21 changes: 21 additions & 0 deletions roles/zabbix_agent/tasks/tmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- name: test restart zabbix-agent
block:
- name: "test Make sure the zabbix-agent service is running"
ansible.builtin.service:
name: "{{ zabbix_agent_service }}"
state: started
enabled: true
become: true
when:
- not (zabbix_agent_docker | bool)
tags:
- service
rescue:
- name: get results
shell:
cmd: journalctl -xe
register: _res

- debug:
var: _res.content | b64decode
- fail:

0 comments on commit e7364ba

Please sign in to comment.