forked from DevelopersPL/otshosting-provisioning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.yml
110 lines (90 loc) · 2.27 KB
/
local.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
- hosts: all
handlers:
- name: reload systemd
command: /bin/systemctl daemon-reload
- name: restart systemd-journald
service:
name: systemd-journald
state: restarted
- name: restart nginx
service:
name: nginx
state: restarted
- name: restart php7.4-fpm
service:
name: php7.4-fpm
state: restarted
- name: restart mysql
service:
name: mysql
state: restarted
tasks:
- name: Fail if not running on Ubuntu
fail:
msg: This playbook only works on Ubuntu systems!
when: ansible_distribution != 'Ubuntu'
tags: always
- name: Fail if Ubuntu older than 20.04
fail:
msg: This playbook requires Ubuntu >= 20.04
when: ansible_distribution_major_version|int < 20
tags: always
- name: Check available PHP package name/version
shell: apt-cache show php-fpm | grep Depends | head | awk '{print $2}'
register: php_version_query
changed_when: False
tags: always
- name: Register available PHP package name/version
set_fact:
# e.g.: php7.3-fpm
php_fpm_package_name: "{{ php_version_query.stdout }}"
# e.g.: php7.3
php_version: "{{ php_version_query.stdout.split('-')[0] }}"
# e.g.: 7.3
php_version_number: "{{ php_version_query.stdout.split('-')[0][3:] }}"
tags: always
- include: tasks/systemd.yml
tags:
- default
- systemd
- include: tasks/general.yml
tags:
- default
- general
- include: tasks/mysql.yml
tags:
- default
- mysql
- include: tasks/php-fpm.yml
tags:
- default
- php-fpm
- include: tasks/nginx.yml
tags:
- default
- nginx
- include: tasks/phpmyadmin.yml
tags:
- default
- pma
- include: tasks/tfs.yml
tags:
- default
- tfs
- include: tasks/tfs-old.yml
tags:
- tfs-old
- include: tasks/znoteaac.yml
tags:
- default
- znote
- include: tasks/myaac.yml
tags:
- myaac
- include: tasks/general-last.yml
tags:
- default
- general
- include: tasks/wine.yml
tags: wine