feat: collect version information once
This commit is contained in:
parent
069eac2566
commit
71a6827ca9
3 changed files with 16 additions and 25 deletions
|
|
@ -1,20 +1,31 @@
|
|||
---
|
||||
|
||||
# load variables
|
||||
- name: "include os specific vars"
|
||||
ansible.builtin.include_vars: "{{ ansible_os_family }}.yaml"
|
||||
# load variables and collect version information
|
||||
- name: "include vars and collect versions"
|
||||
tags:
|
||||
- "zabbix_agent"
|
||||
- "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"
|
||||
- "zabbix_agent_prereq"
|
||||
|
||||
|
||||
|
|
@ -22,7 +33,6 @@
|
|||
- name: "zabbix-agent install"
|
||||
ansible.builtin.import_tasks: "install.yaml"
|
||||
tags:
|
||||
- "zabbix_agent"
|
||||
- "zabbix_agent_install"
|
||||
|
||||
|
||||
|
|
@ -30,5 +40,4 @@
|
|||
- name: "zabbix-agent config"
|
||||
ansible.builtin.import_tasks: "config.yaml"
|
||||
tags:
|
||||
- "zabbix_agent"
|
||||
- "zabbix_agent_config"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue