Browse Source

fix stuff

master
Jérémy Lecour 2 years ago
committed by Jérémy Lecour
parent
commit
c3b1854536
  1. 18
      config.yml
  2. 16
      roles/chexpire-user-init/tasks/main.yml
  3. 1
      roles/puma-systemd/handlers/main.yml

18
config.yml

@ -3,17 +3,12 @@
- hosts: all
gather_facts: yes
become: yes
vars_files:
- vars/main.yml
roles:
- { role: rbenv, username: "{{ ansible_user }}", rbenv_ruby_version: "{{ ruby_version }}" }
- { role: nodejs, nodejs_install_yarn: yes }
- chexpire-admin-init
- apache-vhost
- puma-systemd
post_tasks:
- include_role:
name: etc-git
@ -22,18 +17,23 @@
commit_message: "Ansible post-run config.yml"
- hosts: all
vars_files:
- vars/main.yml
roles:
- { role: chexpire-user-init, username: "{{ ansible_user }}" }
- hosts: all
gather_facts: yes
become: yes
vars_files:
- vars/main.yml
roles:
- apache-vhost
- puma-systemd
tasks:
- name: Puma systemd unit is started
systemd:
name: puma-chexpire
state: started
become: yes

16
roles/chexpire-user-init/tasks/main.yml

@ -97,3 +97,19 @@
# - debug:
# var: db_prepare
# verbosity: 3
- name: custom config for production
replace:
dest: "{{ chexpire_app_directory }}/config/webpacker.yml"
regexp: "compile: false"
replace: "compile: true"
- name: Assets are precompiled
command: "~/.rbenv/shims/bundle exec rails assets:precompile"
args:
chdir: "{{ chexpire_app_directory }}"
- name: Webpacker assets are compiled
command: "~/.rbenv/shims/bundle exec rails webpacker:compile"
args:
chdir: "{{ chexpire_app_directory }}"

1
roles/puma-systemd/handlers/main.yml

@ -2,4 +2,5 @@
- name: systemctl daemon-reload
systemd:
name: puma-chexpire
daemon_reload: True
Loading…
Cancel
Save