-
Notifications
You must be signed in to change notification settings - Fork 2
/
update-reload-app.yml
42 lines (36 loc) · 1.17 KB
/
update-reload-app.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
---
# Playbook to rebuild updated Decidim
- hosts: all
vars:
override_default_file: "{{ lookup('first_found', 'custom_settings/vars.yml', errors='ignore') }}"
roles:
- role: common_settings
tasks:
- name: reload decidim
block:
- name: rails assets precompile
shell: |
. $HOME/.rubyrc
RAILS_ENV={{ deployment_environment }} {{ rbenv_rails_bin }} exec rails tmp:clear
args:
chdir: "{{ decidim_home }}/{{ decidim_app_dir }}"
- name: rails assets precompile
shell: |
. $HOME/.rubyrc
RAILS_ENV={{ deployment_environment }} {{ rbenv_rails_bin }} assets:precompile
args:
chdir: "{{ decidim_home }}/{{ decidim_app_dir }}"
- name: compile shakapacker assets
shell: |
. $HOME/.rubyrc
{{ rbenv_bin_rails }} shakapacker:compile RAILS_ENV={{ deployment_environment }}
args:
chdir: "{{ decidim_home }}/{{ decidim_app_dir }}"
become: yes
become_user: "{{ decidim_user }}"
# end-block install decidim
- name: restart nginx
service:
name: nginx
state: restarted
become: true