Update to 2022-04-06 11:00

This commit is contained in:
Daniel Berteaud
2022-04-06 11:00:07 +02:00
parent f588ca82ba
commit 57d48dafc7
8 changed files with 66 additions and 57 deletions

View File

@@ -1,19 +1,11 @@
---
- name: Check if a TLS PSK key exists
stat: path=/etc/zabbix/zabbix_proxy.psk
register: zbx_proxy_psk
tags: zabbix
- name: Generate random PSK key for TLS encryption
shell: "openssl rand -hex 32 > /etc/zabbix/zabbix_proxy.psk"
when:
- not zbx_proxy_psk.stat.exists
- zabbix_proxy_encryption | default('none') == "psk"
args:
creates: /etc/zabbix/zabbix_proxy.psk
tags: zabbix
- name: Restrict permission on PSK file
file: path=/etc/zabbix/zabbix_proxy.psk owner=root group=zabbix mode=0640
when:
- not zbx_proxy_psk.stat.exists
- zabbix_proxy_encryption | default('none') == "psk"
tags: zabbix