-
Notifications
You must be signed in to change notification settings - Fork 5
/
deploy.yml
72 lines (63 loc) · 1.12 KB
/
deploy.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
- hosts: all
tasks:
- name: set authorized key
authorized_key:
user: "{{ ansible_user }}"
key: "{{ lookup('file', '/home/{{ ansible_user }}/.ssh/id_rsa.pub') }}"
state: present
- name: check config locally
hosts: localhost
any_errors_fatal: true
tags:
- always
roles:
- check_config
- name: check system environment
hosts: all
any_errors_fatal: true
tags:
- always
roles:
- check_system
- name: configuring system parameters
hosts: all
remote_user: root
gather_facts: false
sudo: yes
roles:
- common
- name: deploy mysql
hosts: mysql
gather_facts: true
sudo: yes
roles:
- mysql
- name: deploy radon
hosts: radon
gather_facts: true
sudo: yes
roles:
- radon_common
- name: deploy node_exporter
hosts: all
sudo: yes
roles:
- node_exporter
- name: deploy mysql_exporter
hosts: mysql
sudo: yes
roles:
- mysqld_exporter
- name: deploy prometheus
hosts: monitor
gather_facts: true
sudo: yes
roles:
- prometheus
- name: deploy grafana
hosts: monitor
gather_facts: true
sudo: yes
roles:
- grafana