---
# defaults file for zabbix_agent

zabbix_agent2: false
zabbix_agent_version_minor: "*"
zabbix_version_patch: 0
zabbix_agent_package_remove: false
zabbix_agent_sender_package: zabbix-sender
zabbox_agent_get_package: zabbix-get
zabbix_agent_package_state: present
zabbix_agent_selinux: false
zabbix_agent_conf_mode: "0644"
zabbix_agent_dont_detect_ip: false

zabbix_agent_listeninterface:
zabbix_agent_allowroot: false
zabbix_agent_buffersend: 5
zabbix_agent_buffersize: 100
zabbix_agent_controlsocket: /tmp/agent.sock
zabbix_agent_debuglevel: 3
zabbix_agent_enablepersistentbuffer: false
zabbix_agent_enableremotecommands: false
zabbix_agent_forceactivechecksonstart: false
zabbix_agent_heartbeatfrequency: 60
zabbix_agent_hostname: "{{ inventory_hostname }}"
zabbix_agent_include_mode: "0755"
zabbix_agent_listenip: 0.0.0.0
zabbix_agent_listenport: 10050
zabbix_agent_logfilesize: 100
zabbix_agent_logtype: file
zabbix_agent_maxlinespersecond: 20
zabbix_agent_persistentbufferperiod: 1h
zabbix_agent_pluginsocket: /tmp/agent.plugin.sock
zabbix_agent_plugintimeout: 3
zabbix_agent_refreshactivechecks: 120
zabbix_agent_statusport: 9999
zabbix_agent_timeout: 3
zabbix_agent_tlspsk_auto: false
zabbix_agent_tlspskfile: /etc/zabbix/tls_psk_auto.secret
zabbix_agent_unsafeuserparameters: false
zabbix_agent_runas_user: zabbix
zabbix_agent_loadmodulepath: ${libdir}/modules
zabbix_agent_logremotecommands: false
zabbix_agent_startagents: 3

zabbix_agent_tlspskidentity_file: "/etc/zabbix/tls_psk_auto.identity"
# Selinux related vars
selinux_allow_zabbix_run_sudo: false

zabbix_agent_install_agent_only: false

# Zabbix role related vars
zabbix_apt_force_apt_get: true
zabbix_apt_install_recommends: false

# Override Ansible specific facts
zabbix_agent_disable_repo:
  - epel

# Zabbix API stuff
zabbix_api_use_ssl: false
zabbix_api_login_user: Admin
zabbix_api_login_pass: !unsafe zabbix
zabbix_api_server_host: localhost
zabbix_api_server_port: "{{ zabbix_api_use_ssl | ternary('443', '80') }}"
zabbix_api_validate_certs: false

# API Related Variables
zabbix_api_create_hostgroup: false
zabbix_api_create_hosts: false
zabbix_agent_host_state: present # or absent
zabbix_agent_host_update: true
zabbix_host_status: enabled # or disabled
zabbix_agent_proxy: null
zabbix_agent_inventory_mode: disabled
zabbix_useuip: 1
zabbix_host_groups:
  - Linux servers
zabbix_agent_link_templates:
  - Linux by Zabbix agent

zabbix_agent_interfaces:
  - type: 1
    main: 1
    useip: "{{ zabbix_useuip }}"
    ip: "{{ zabbix_agent_ip }}"
    dns: "{{ ansible_fqdn }}"
    port: "{{ zabbix_agent_listenport }}"

# statusportzabbix_agent_zabbix_alias: # Deprecate after 3.0
zabbix_agent_userparameters_templates_src: "userparameters"
zabbix_agent_userparameters_scripts_src: "scripts"
zabbix_agent_chassis: false

zabbix_agent_tls_config:
  unencrypted: "1"
  psk: "2"
  cert: "4"

# IPMI settings
zabbix_agent_ipmi_authtype: -1
zabbix_agent_ipmi_privilege: 2

####### Agent 1 Stuff Only

# Windows/macOS Related
zabbix_version_long: 5.2.4

# Windows Related
zabbix_win_download_url: https://cdn.zabbix.com/zabbix/binaries/stable
zabbix_win_install_dir: 'C:\Zabbix'
zabbix_win_install_dir_conf: '{{ zabbix_win_install_dir }}\conf'
zabbix_win_install_dir_bin: '{{ zabbix_win_install_dir }}\bin'
zabbix_win_firewall_management: true

# macOS Related
zabbix_mac_package: zabbix_agent-{{ zabbix_version_long }}-macos-amd64-openssl.pkg
zabbix_mac_download_url: https://cdn.zabbix.com/zabbix/binaries/stable
zabbix_mac_download_link: "{{ zabbix_mac_download_url }}/{{ zabbix_agent_version }}/{{ zabbix_version_long }}/{{ zabbix_mac_package }}"

# Zabbix Agent Docker facts
zabbix_agent_docker: false
zabbix_agent_docker_state: started
zabbix_agent_docker_name: zabbix-agent
zabbix_agent_docker_image: "zabbix/zabbix-agent"
zabbix_agent_docker_image_tag: "ubuntu-{{ zabbix_agent_version }}.{{ zabbix_version_patch }}"
zabbix_agent_docker_user_gid: 101
zabbix_agent_docker_user_uid: 101
zabbix_agent_docker_network_mode: host
zabbix_agent_docker_restart_policy: unless-stopped
zabbix_agent_docker_privileged: false
zabbix_agent_docker_ports:
  - 10050:10050
zabbix_agent_docker_security_opts:
  - apparmor:unconfined
zabbix_agent_docker_volumes:
  - /etc/zabbix/zabbix_agentd.d:{{ zabbix_agent_docker_include_dir }}
  - /:/hostfs:ro
  - /etc:/hostfs/etc:ro
  - /proc:/hostfs/proc:ro
  - /sys:/hostfs/sys:ro
  - /var/run:/var/run
zabbix_agent_docker_env:
  ZBX_HOSTNAME: "{{ zabbix_agent_hostname }}"
  ZBX_SERVER_HOST: "{{ zabbix_agent_server }}"
  ZBX_PASSIVE_ALLOW: "{{ zabbix_agent_serverpassive_allow | default(omit) }}"
  ZBX_PASSIVESERVERS: "{{ zabbix_agent_serverpassive | default(omit) }}"
  ZBX_ACTIVE_ALLOW: "{{ zabbix_agent_serveractive_allow | default(omit) }}"
  ZBX_LOADMODULE: "{{ zabbix_agent_loadmodule | default(omit) }}"
  ZBX_DEBUGLEVEL: "{{ zabbix_agent_debuglevel }}"
  ZBX_TIMEOUT: "{{ zabbix_agent_timeout }}"
  ZBX_SOURCEIP: "{{ zabbix_agent_sourceip | default(omit) }}"
  ZBX_ENABLEREMOTECOMMANDS: "{{ zabbix_agent_enableremotecommands | default(omit) }}"
  ZBX_LOGREMOTECOMMANDS: "{{ zabbix_agent_logremotecommands | default(omit) }}"
  ZBX_STARTAGENTS: "{{ zabbix_agent_startagents | default(omit) }}"
  ZBX_HOSTNAMEITEM: "{{ zabbix_agent_hostnameitem | default(omit) }}"
  ZBX_METADATA: "{{ zabbix_agent_hostmetadata | default(omit) }}"
  ZBX_METADATAITEM: "{{ zabbix_agent_hostmetadataitem | default(omit) }}"
  ZBX_REFRESHACTIVECHECKS: "{{ zabbix_agent_refreshactivechecks | default(omit) }}"
  ZBX_BUFFERSEND: "{{ zabbix_agent_buffersend | default(omit) }}"
  ZBX_BUFFERSIZE: "{{ zabbix_agent_buffersize | default(omit) }}"
  ZBX_MAXLINESPERSECOND: "{{ zabbix_agent_maxlinespersecond | default(omit) }}"
  ZBX_LISTENIP: "{{ zabbix_agent_listenip }}"
  ZBX_UNSAFEUSERPARAMETERS: "{{ zabbix_agent_unsafeuserparameters | default(omit) }}"
  ZBX_TLSCONNECT: "{{ zabbix_agent_tlsconnect | default(omit) }}"
  ZBX_TLSACCEPT: "{{ zabbix_agent_tlsaccept | default(omit) }}"
  ZBX_TLSCAFILE: "{{ zabbix_agent_tlscafile | default(omit) }}"
  ZBX_TLSCRLFILE: "{{ zabbix_agent_tlscrlfile | default(omit) }}"
  ZBX_TLSSERVERCERTISSUER: "{{ zabbix_agent_tlsservercertissuer | default(omit) }}"
  ZBX_TLSSERVERCERTSUBJECT: "{{ zabbix_agent_tlsservercertsubject | default(omit) }}"
  ZBX_TLSCERTFILE: "{{ zabbix_agent_tlscertfile | default(omit) }}"
  ZBX_TLSKEYFILE: "{{ zabbix_agent_tlskeyfile | default(omit) }}"
  ZBX_TLSPSKIDENTITY: "{{ zabbix_agent_tlspskidentity | default(omit) }}"
