deploy zabbix files to monitor certificates
This commit is contained in:
@@ -19,6 +19,7 @@ apache_access_log: {{ apache_base_dir}}/logs/access_log
|
||||
apache_php_socket: {{ apache_base_dir }}/php-fpm.sock
|
||||
apache_use_php: true
|
||||
apache_use_ssl: true
|
||||
apache_use_zabbix: true - wether we install script to monitor certificate expiry date
|
||||
apache_use_certbot: true
|
||||
apache_stats: true
|
||||
apache_ssl_certificate: /etc/letsencrypt/live/{{ apache_server_name }}/cert.pem
|
||||
|
||||
@@ -6,6 +6,7 @@ apache_access_log: "{{ apache_base_dir}}/logs/access_log"
|
||||
apache_php_socket: "{{ apache_base_dir }}/php-fpm.sock"
|
||||
apache_use_php: true
|
||||
apache_use_ssl: true
|
||||
apache_use_zabbix: true
|
||||
apache_use_certbot: true
|
||||
apache_ssl_certificate: "/etc/letsencrypt/live/{{ apache_server_name }}/cert.pem"
|
||||
apache_ssl_chain: "/etc/letsencrypt/live/{{ apache_server_name }}/fullchain.pem"
|
||||
|
||||
@@ -10,4 +10,9 @@
|
||||
service:
|
||||
name: php73-php-fpm
|
||||
state: restarted
|
||||
when: apache_restart
|
||||
when: apache_restart
|
||||
|
||||
- name: restart zabbix_agentd
|
||||
service:
|
||||
name: zabbix-agent
|
||||
state: restarted
|
||||
@@ -52,4 +52,9 @@
|
||||
- name: goaccess
|
||||
import_tasks: goaccess.yml
|
||||
when: apache_stats
|
||||
tags: stats
|
||||
tags: stats
|
||||
|
||||
- name: zabbix setup
|
||||
import_tasks: zabbix.yml
|
||||
when: apache_use_zabbix and apache_use_ssl
|
||||
tags: zabbix, ssl
|
||||
13
tasks/zabbix.yml
Normal file
13
tasks/zabbix.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: deploy zabbix lld script
|
||||
copy:
|
||||
src: lld_certlist.py
|
||||
dest: /etc/zabbix/scripts
|
||||
group: zabbix
|
||||
mode: 0750
|
||||
|
||||
- name: deploy zabbix userparameter
|
||||
copy:
|
||||
dest: /etc/zabbix/zabbix_agentd.d/user_parameter_certificate_discovery.conf
|
||||
content: "UserParameter=certificate.discovery,/etc/zabbix/scripts/lld_certlist.py"
|
||||
notify: restart zabbix_agentd
|
||||
Reference in New Issue
Block a user