-
Notifications
You must be signed in to change notification settings - Fork 2
/
discuz.yml
77 lines (64 loc) · 2.38 KB
/
discuz.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
73
74
75
76
77
## 部署
- name: discuz
hosts: all
become: yes
become_method: sudo
vars_files:
- vars/main.yml
vars_prompt:
- name: 'webs_selection'
prompt: "\nWhich Web-Server do you want to use? [ 1/2 ] \n\n
1: Apache\n
2: Nginx\n"
private: no
default: 1
- name: 'distribution_selection'
prompt: "\nWhich distribution do you want to use? [ 1/3 ] \n\n
1: DiscuzX3.4(suggestion)\n
2: DiscuzX3.3\n
3: DiscuzQ\n"
private: no
default: 1
vars:
webs_select:
'1': 'apache'
'2': 'nginx'
distribution_select:
'1': "discuzx34"
'2': "discuzx33"
'3': "discuzq"
infrastructure_select:
'1': 'LAMP'
'2': 'LNMP'
runtime_name: "{{infrastructure_select[webs_selection] | lower}}"
discuz_webs: "{{webs_select[webs_selection]}}"
discuz_latest: "{{distribution_select[distribution_selection]}}"
w9panel_webs: "{{webs_select[webs_selection]}}"
w9panel_set_infrastructure: "{{infrastructure_select[webs_selection]}}"
w9panel_set_apps:
- Discuz
preend_certbot: True
discuz_init_path: "{{ (discuz_latest == 'discuzq')| ternary('/data/wwwroot/discuz/public/dl.php','/data/wwwroot/discuz/upload/config/config_global_default.php') }}"
pre_tasks:
- include_vars: roles/role_cloud/vars/cloud_download_url.yml
when: region == '1' or region == 1
- include_vars: vars/special.yml
when: discuz_latest == "discuzx33"
- debug:
msg: Discuz will be installed on {{w9panel_set_infrastructure}}, php is {{php_version}}, OS is {{ansible_distribution}}, region code is {{region}}
roles:
- {role: role_common, tags: "role_common"}
- {role: role_cloud, tags: "role_cloud"}
- {role: role_apache, tags: "role_apache", when: discuz_webs == 'apache'}
- {role: role_nginx, tags: "role_nginx", when: discuz_webs == 'nginx'}
- {role: role_mysql, tags: "role_mysql"}
- {role: role_php, tags: "role_php"}
- {role: role_inotify_watch, tags: "role_inotify_watch"}
- {role: role_9panel, tags: "role_9panel"}
- {role: role_redis, tags: "role_redis"}
- {role: role_docker, tags: "role_docker"}
- {role: role_nodejs, tags: "role_nodejs"}
- {role: discuz, tags: "discuz"}
- {role: role_init, tags: "role_init"}
- {role: role_preend, tags: "role_preend"}
- {role: role_end, tags: "role_end"}