-
Notifications
You must be signed in to change notification settings - Fork 3
/
webserver.yml
100 lines (92 loc) · 2.6 KB
/
webserver.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
---
#
# Webserver for running Ruby on Rails with postgresql & node.
#
# Run
# ansible-playbook webserver.yml -b -v
# -b become sudo
# -v verbose
- hosts: webservers
user: deploy
vars:
ansible_ssh_user: deploy
locale:
locale: "en_AU.UTF-8"
language: "en_AU:en"
numeric: "en_AU.UTF-8"
time: "en_AU.UTF-8"
monetary: "en_AU.UTF-8"
paper: "en_AU.UTF-8"
identification: "en_AU.UTF-8"
name: "en_AU.UTF-8"
address: "en_AU.UTF-8"
telephone: "en_AU.UTF-8"
measurement: "en_AU.UTF-8"
rbenv:
env: system
version: v1.1.0
default_ruby: 2.7.1
rubies:
- version: 2.4.10
- version: 2.5.8
- version: 2.6.6
- version: 2.7.1
env:
RUBY_CONFIGURE_OPTS: "--enable-shared"
default_gems_file: common/files/default-gems
roles:
- role: zzet.rbenv
rbenv_users:
- "{{ ansible_user }}"
# # Install passenger & apache
# # 12/03/2019 - Issue with installation, using apt package instead
# - role: mtpereira.passenger
# passenger_webserver: apache
# passenger_pkgs_state: installed
# become: yes
vars_files:
- "vars/defaults.yml"
- "vars/{{ ansible_distribution }}-{{ ansible_architecture }}.yml"
- "vars/{{ ansible_distribution }}.yml"
pre_tasks:
- name: Install ca-certificates for git to work
apt: pkg=ca-certificates state=latest
- name: Ensure a locale exists
locale_gen:
name: en_AU.UTF-8
state: present
- include: common/tasks/add_repositories.yml
become: yes
- include: common/tasks/compression-tools.yml
tasks:
- include: common/tasks/apache.yml
become: yes
- include: common/tasks/passenger.yml
become: yes
- include: common/tasks/system-webserver.yml
become: yes
- include: common/tasks/node.yml
- include: common/tasks/email-server.yml
become: yes
- include: common/tasks/ruby.yml
- include: common/tasks/rails-dependencies.yml
- include: common/tasks/postgresql.yml
become: yes
- include: common/tasks/monit.yml
become: yes
- include: common/tasks/yarn.yml
become: yes
- include: common/tasks/redis.yml
- include: common/tasks/backup.yml
- include: common/tasks/letsencrypt.yml
become: yes
- include: common/tasks/fonts.yml
become: yes
- include: common/tasks/wkhtmltopdf.yml
become: yes
tags: focus
# Fixes
- include: common/tasks/mtpereira.passenger_fix.yml
become: yes
handlers:
- include: common/handlers/handlers.yml