-
Notifications
You must be signed in to change notification settings - Fork 4
/
playbook.yml
126 lines (126 loc) · 3.12 KB
/
playbook.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
- name: "Configure host"
hosts: 127.0.0.1
connection: local
become: yes
tasks:
- name: "Install git"
apt:
name: git
state: latest
tags: ["utils"]
- name: "Install Python"
apt:
name: python3
state: latest
tags: ["utils"]
- name: "Install Python PIP"
apt:
name: python3-pip
state: latest
tags: ["utils"]
- name: "Install make"
apt:
name: make
state: latest
tags: ["utils"]
- name: "Install libcurl"
apt:
name: libcurl4-openssl-dev
state: latest
tags: ["utils"]
- name: "Install libssl"
apt:
name: libssl-dev
state: latest
tags: ["utils"]
- name: "Install supervisor"
apt:
name: supervisor
state: latest
tags: ["utils"]
- name: "Install gifsicle"
apt:
name: gifsicle
state: latest
tags: ["utils"]
- name: "Install nginx"
apt:
name: nginx
state: latest
tags: ["utils"]
- name: "Install redis"
apt:
name: redis-server
state: latest
tags: ["utils"]
- name: "Install libgl1"
apt:
name: libgl1
state: latest
tags: ["utils"]
- name: Create dir logs and permissions
ansible.builtin.file:
path: /var/logs/
state: directory
mode: '0756'
tags: ["dir"]
- name: Create dir run and permissions
ansible.builtin.file:
path: /var/logs/
state: directory
mode: '0756'
tags: ["dir"]
- name: Create dir logs and permissions
ansible.builtin.file:
path: /tmp/thumbor/
state: directory
mode: '0756'
tags: ["dir"]
- name: Create dir logs and permissions
ansible.builtin.file:
path: /tmp/current/
state: directory
mode: '0756'
tags: ["dir"]
- name: Download Git Thumbor
ansible.builtin.git:
repo: https://github.com/thumbor/thumborizeme.git
dest: /tmp/current/
force: yes
version: master
tags: ["thumbor"]
- name: Run make 'setup'
make:
chdir: /tmp/current
target: setup
tags: ["thumbor"]
- name: Copy supervisord.conf and permissions
ansible.builtin.copy:
src: /tmp/current/supervisor.conf
dest: /etc/supervisor/supervisord.conf
mode: '0756'
tags: ["thumbor"]
- name: Copy thumbor.conf and permissions
ansible.builtin.copy:
src: /tmp/current/thumbor.conf
dest: /etc/thumbor.conf
mode: '0756'
tags: ["thumbor"]
- name: Copy nginx.conf and permissions
ansible.builtin.copy:
src: /tmp/current/nginx.conf
dest: /etc/nginx/sites-available/default
mode: '0756'
tags: ["thumbor"]
- name: "Restart nginx"
ansible.builtin.systemd:
name: nginx
state: restarted
enabled: yes
tags: ["restarted"]
- name: "Restart supervisor"
ansible.builtin.systemd:
state: restarted
name: supervisor
enabled: yes
tags: ["restarted"]