mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
5
roles/zabbix_lld_all_graph/tasks/conf.yml
Normal file
5
roles/zabbix_lld_all_graph/tasks/conf.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Deploy lld graphs config
|
||||
template: src=zabbix-lld-all-graph.j2 dest=/etc/sysconfig/zabbix-lld-all-graph mode=600 owner=zabbix
|
||||
tags: zabbix
|
26
roles/zabbix_lld_all_graph/tasks/install.yml
Normal file
26
roles/zabbix_lld_all_graph/tasks/install.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
|
||||
- name: Install packages
|
||||
package:
|
||||
name:
|
||||
- curl
|
||||
- perl-Getopt-Long
|
||||
- perl-Time-HiRes
|
||||
tags: zabbix
|
||||
|
||||
- name: Install zabbix_lld_all_graph script
|
||||
copy: src=zabbix_lld_all_graph dest=/usr/local/bin/zabbix_lld_all_graph mode=755
|
||||
tags: zabbix
|
||||
|
||||
- name: Install lld_all_graph systemd units
|
||||
template: src={{ item }}.j2 dest=/etc/systemd/system/{{ item }}
|
||||
loop:
|
||||
- zabbix-lld-all-graph.service
|
||||
- zabbix-lld-all-graph.timer
|
||||
register: zabbix_lld_all_graph_units
|
||||
tags: zabbix
|
||||
|
||||
- name: Reload systemd
|
||||
systemd: daemon_reload=True
|
||||
when: zabbix_lld_all_graph_units.results | selectattr('changed','equalto',True) | list | length > 0
|
||||
tags: zabbix
|
5
roles/zabbix_lld_all_graph/tasks/main.yml
Normal file
5
roles/zabbix_lld_all_graph/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- include: install.yml
|
||||
- include: conf.yml
|
||||
- include: services.yml
|
8
roles/zabbix_lld_all_graph/tasks/services.yml
Normal file
8
roles/zabbix_lld_all_graph/tasks/services.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
- name: Handle zabbix-lld-all-graph timer
|
||||
systemd:
|
||||
name: zabbix-lld-all-graph.timer
|
||||
state: "{{ (zabbix_lld_all_graph_api_user is defined and zabbix_lld_all_graph_api_pass is defined and zabbix_lld_all_graph_api_url is defined) | ternary('started','stopped') }}"
|
||||
enabled: "{{ (zabbix_lld_all_graph_api_user is defined and zabbix_lld_all_graph_api_pass is defined and zabbix_lld_all_graph_api_url is defined) | ternary(True,False) }}"
|
||||
tags: zabbix
|
Reference in New Issue
Block a user