---
# handlers file for zabbix-javagateway

- name: zabbix-java-gateway restarted
  ansible.builtin.service:
    name: zabbix-java-gateway
    state: restarted
    enabled: true
  become: true

- name: "clean repo files from proxy creds"
  ansible.builtin.shell: ls /etc/yum.repos.d/zabbix* && sed -i 's/^proxy =.*//' /etc/yum.repos.d/zabbix* || true
  become: true
  when:
    - ansible_os_family == 'RedHat'
    - zabbix_http_proxy is defined or zabbix_https_proxy is defined
