This repository was archived by the owner on Jul 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.yml
More file actions
70 lines (65 loc) · 2.18 KB
/
server.yml
File metadata and controls
70 lines (65 loc) · 2.18 KB
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
- include: common.yml
- hosts: server
vars:
- roswell_version: master
- server_deploy_path: /srv/www/quickdocs-server
- server_deploy_port: 38080
pre_tasks:
- user: name=git home=/srv/git
sudo: yes
- user: name=www home=/srv/www
sudo: yes
- shell: chmod 777 /srv/www
sudo: yes
roles:
- libev
- roswell
- supervisor
- server_starter
- nginx
- clack
- qlot
- { role: quickdocs-server, deploy_path: "{{ server_deploy_path }}" }
tasks:
- name: create log directory
file: path=/var/log/apps mode=777 state=directory
- name: .sbclrc
template: src=templates/sbclrc.j2 dest=~/.sbclrc
- name: source-registry configuration directory
file: path=~/.config/common-lisp/source-registry.conf.d/ state=directory
- name: source-registry configuration file
file: path=~/.config/common-lisp/source-registry.conf.d/local.conf state=touch
- name: add to central registry
lineinfile:
dest=~/.config/common-lisp/source-registry.conf.d/local.conf
regexp="{{ server_deploy_path }}"
line="(:directory \"{{ server_deploy_path }}\")"
state=present
insertafter=EOF
- shell: qlot install
chdir="{{ server_deploy_path }}"
- name: nginx.conf
sudo: yes
template: src=templates/nginx.conf.j2 dest=/etc/nginx/sites-available/quickdocs
- name: enable nginx.conf
sudo: yes
file: src=/etc/nginx/sites-available/quickdocs dest=/etc/nginx/sites-enabled/quickdocs state=link
- name: restart nginx
sudo: yes
service: name=nginx state=restarted
- stat: path=/etc/supervisor.d/quickdocs.ini
register: supervisor_conf
- name: supervisor configuration file
sudo: yes
template: src=templates/supervisor.conf.j2 dest=/etc/supervisor.d/quickdocs.ini
when: not supervisor_conf.stat.exists
- name: reread supervisord
sudo: yes
shell: supervisorctl reread
- name: add to supervisor process group
sudo: yes
shell: supervisorctl add quickdocs
when: not supervisor_conf.stat.exists
- name: restart supervisor
sudo: yes
shell: supervisorctl update quickdocs