-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdeploy.yml
65 lines (58 loc) · 1.42 KB
/
deploy.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
---
- name: Deploy our Rails ap
hosts: all
become: true
become_user: "{{ deploy_user }}"
pre_tasks:
- name: Setup app folder
file:
state: directory
path: "{{ app_root_path }}"
owner: "{{ deploy_user }}"
group: "{{ deploy_group }}"
- name: Copy rbenv-vars file
template:
src: ".rbenv-vars.j2"
dest: "{{ app_root_path }}/.rbenv-vars"
owner: "{{ deploy_user }}"
group: "{{ deploy_group }}"
- name: Make shared directories
file:
path: "{{ app_shared_path }}/{{ item }}"
state: directory
owner: "{{ deploy_user }}"
group: "{{ deploy_group }}"
with_items:
- tmp
- tmp/pids
- tmp/cache
- sockets
- log
- public
- public/packs
- vendor
- vendor/bundle
- bin
- config
- config/puma
- assets
- node_modules
- name: Upload shared files
template:
src: "{{ item.src }}"
dest: "{{ app_shared_path }}/{{ item.dest }}"
owner: "{{ deploy_user }}"
group: "{{ deploy_group }}"
with_items: "{{ shared_files_to_copy }}"
tags:
- copy
roles:
- role: ansistrano.deploy
- role: puma
tags: puma
become: true
become_user: root
- role: sidekiq
tags: sidekiq
become: true
become_user: root