-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmagento.yml
70 lines (63 loc) · 2.21 KB
/
magento.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
## 部署
- name: Magento
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: 'sample_selection'
prompt: "\nDo you want to install Magento sample data? [ 1/2 ] \n\n
1: Yes, install it\n
2: No, don't install it\n"
private: no
default: 2
vars:
webs_select:
'1': 'apache'
'2': 'nginx'
infrastructure_select:
'1': 'LAMP'
'2': 'LNMP'
sample_select:
'1': True
'y': True
'2': False
'n': False
runtime_name: "{{infrastructure_select[webs_selection] | lower}}"
magento_webs: "{{webs_select[webs_selection]}}"
w9panel_webs: "{{webs_select[webs_selection]}}"
magento_install_sample: "{{sample_select[sample_selection]}}"
w9panel_set_infrastructure: "{{infrastructure_select[webs_selection]}}"
w9panel_set_apps:
- Magento
pre_tasks:
- include_vars: roles/role_cloud/vars/cloud_download_url.yml
when: region == '1' or region == 1
- debug:
msg: Magento will be installed on {{w9panel_set_infrastructure}}, 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: magento_webs == 'apache'}
- {role: role_nginx, tags: "role_nginx", when: magento_webs == 'nginx'}
- {role: role_jdk, tags: "role_jdk" }
- {role: role_elasticsearch , tags: "role_elasticsearch" }
- {role: role_varnish , tags: "role_varnish" }
- {role: role_rabbitmq , tags: "role_rabbitmq"}
- {role: role_mysql, tags: "role_mysql"}
- {role: role_redis, tags: "role_redis"}
- {role: role_docker, tags: "role_docker"}
- {role: role_php, tags: "role_php"}
- {role: role_9panel, tags: "role_9panel"}
- {role: magento, tags: "magento"}
- {role: role_inotify_watch, tags: "role_inotify_watch"}
- {role: role_init, tags: "role_init"}
- {role: role_preend, tags: "role_preend"}
- {role: role_end, tags: "role_end"}