-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
56 lines (49 loc) · 1.59 KB
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
- hosts: zbx_dev_nodes
name: Configures hosts to run standalone zabbix-server installations with specified versions
vars:
mysql_bind_address: '127.0.0.1'
zabbix_version: '{{ zbx_version }}'
zabbix_url: '{{ ansible_host }}'
zabbix_server_database: mysql
zabbix_server_database_long: mysql
zabbix_server_dbport: 3306
zabbix_apache_tls: True
zabbix_apache_redirect: True
zabbix_apache_SSLPassPhraseDialog: builtin
zabbix_apache_SSLSessionCache: none
zabbix_apache_SSLCryptoDevice: builtin
zabbix_apache_tls_crt: /etc/ssl/zabbix.pem
zabbix_apache_tls_key: /etc/ssl/zabbix.key
pre_tasks:
- name: Download get-pip.py installation script
get_url:
url: https://bootstrap.pypa.io/get-pip.py
dest: /tmp/get-pip.py
mode: 0755
- name: Install pip
command: python3 /tmp/get-pip.py
- name: Install required python packages
pip:
name: '{{ item }}'
state: latest
loop:
- pyOpenSSL
- PyMySQL
- name: Generate an OpenSSL private key
openssl_privatekey:
path: /etc/ssl/zabbix.key
- name: Generate an OpenSSL CSR
openssl_csr:
path: /etc/ssl/zabbix.csr
privatekey_path: /etc/ssl/zabbix.key
common_name: "{{ ansible_host }}"
- name: Generate a Self Signed OpenSSL certificate
openssl_certificate:
path: /etc/ssl/zabbix.pem
privatekey_path: /etc/ssl/zabbix.key
csr_path: /etc/ssl/zabbix.csr
provider: selfsigned
roles:
- geerlingguy.mysql
- dj-wasabi.zabbix-server
- dj-wasabi.zabbix-web