43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
---
|
|
|
|
# load variables and collect version information
|
|
- name: "include vars and collect versions"
|
|
tags:
|
|
- "zabbix_agent_prereq"
|
|
- "zabbix_agent_install"
|
|
- "zabbix_agent_config"
|
|
block:
|
|
|
|
# load os specific variables
|
|
- name: "include os specific vars"
|
|
ansible.builtin.include_vars: "{{ ansible_os_family }}.yaml"
|
|
|
|
# collect zabbix-agent2 version information
|
|
- name: "collect version information"
|
|
ansible.builtin.shell:
|
|
cmd: "zabbix_agent2 --version | head -n 1"
|
|
changed_when: false
|
|
failed_when: false
|
|
ignore_errors: true
|
|
register: "zabbix_current_version"
|
|
|
|
|
|
# zabbix-agent prerequisites
|
|
- name: "zabbix-agent prerequisites"
|
|
ansible.builtin.import_tasks: "prerequisites.yaml"
|
|
tags:
|
|
- "zabbix_agent_prereq"
|
|
|
|
|
|
# zabbix-agent install
|
|
- name: "zabbix-agent install"
|
|
ansible.builtin.import_tasks: "install.yaml"
|
|
tags:
|
|
- "zabbix_agent_install"
|
|
|
|
|
|
# zabbix-agent config
|
|
- name: "zabbix-agent config"
|
|
ansible.builtin.import_tasks: "config.yaml"
|
|
tags:
|
|
- "zabbix_agent_config"
|