2018-11-03 00:00:16 +01:00
|
|
|
---
|
|
|
|
- name: clone hopglass
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/hopglass/hopglass"
|
|
|
|
dest: "{{ hopglass_frontend_path }}"
|
|
|
|
accept_hostkey: yes
|
|
|
|
update: no
|
|
|
|
|
|
|
|
- name: create build directory
|
|
|
|
file:
|
|
|
|
path: "{{ hopglass_frontend_path }}/build"
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: template config.json
|
|
|
|
template:
|
|
|
|
src: hopglass-config.j2
|
|
|
|
dest: "{{ hopglass_frontend_path }}/build/config.json"
|
|
|
|
|
|
|
|
- name: template nginx site
|
|
|
|
template:
|
|
|
|
src: nginx-site.j2
|
2018-11-10 00:19:54 +01:00
|
|
|
dest: /etc/nginx/sites-available/hopglass
|
|
|
|
notify: reload nginx
|
2018-11-03 00:00:16 +01:00
|
|
|
|
2018-11-10 00:19:54 +01:00
|
|
|
- name: enable site
|
|
|
|
file:
|
|
|
|
src: ../sites-available/hopglass
|
|
|
|
dest: /etc/nginx/sites-enabled/hopglass
|
|
|
|
state: link
|
|
|
|
notify: reload nginx
|
2018-11-03 00:00:16 +01:00
|
|
|
|
|
|
|
- name: template make-hopglass-frontend
|
|
|
|
template:
|
|
|
|
src: make-hopglass-frontend.j2
|
|
|
|
dest: /usr/local/bin/make-hopglass-frontend
|
|
|
|
mode: 0755
|
|
|
|
register: make
|
|
|
|
|
|
|
|
- name: show usage information
|
|
|
|
debug:
|
|
|
|
msg: ">>> Because Node.js is terrible, please run make-hopglass-frontend manually. <<<"
|
|
|
|
when: make.changed
|