ansible-config/roles/hopglass-frontend/tasks/install-hopglass.yml
2018-11-03 00:00:16 +01:00

42 lines
937 B
YAML

---
- 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
dest: /etc/nginx/conf.d/hopglass.conf
register: nginx
- name: reload nginx
service:
name: nginx
state: reloaded
when: nginx.changed
- 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