add warehost-client-web
This commit is contained in:
parent
b8aacc4f3b
commit
62a8d2675a
|
@ -1,3 +1,3 @@
|
||||||
warehost_webclient_domain: warehost.de
|
warehost_webclient_domain: warehost.de
|
||||||
warehost_webclient_repo: git@dev.sum7.eu:sum7/warehost-client-web.git
|
warehost_webclient_repo: https://dev.sum7.eu/sum7/warehost-client-web.git
|
||||||
warehost_webclient_version: master
|
warehost_webclient_version: master
|
||||||
|
|
|
@ -1,7 +1,55 @@
|
||||||
---
|
---
|
||||||
|
- name: Install packages
|
||||||
|
apt: name={{ item }}
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
- npm
|
||||||
|
|
||||||
|
- name: Install global node packages
|
||||||
|
npm: name={{item}} global=yes
|
||||||
|
with_items:
|
||||||
|
- grunt-cli
|
||||||
|
- bower
|
||||||
|
|
||||||
|
- name: Clone repository
|
||||||
|
git: repo={{ warehost_webclient_repo }}
|
||||||
|
dest=/usr/src/warehost-client-web/
|
||||||
|
version={{warehost_webclient_version}}
|
||||||
|
force=yes
|
||||||
|
|
||||||
|
- name: Install node dependencies
|
||||||
|
npm: path=/usr/src/warehost-client-web
|
||||||
|
|
||||||
|
- name: Install bower dependencies
|
||||||
|
command: nodejs /usr/local/bin/bower install --allow-root
|
||||||
|
args:
|
||||||
|
chdir: "/usr/src/warehost-client-web"
|
||||||
|
|
||||||
|
- name: Build warehost-client-web
|
||||||
|
command: nodejs /usr/local/bin/grunt build
|
||||||
|
args:
|
||||||
|
chdir: "/usr/src/warehost-client-web"
|
||||||
|
|
||||||
|
- name: Create destination directory
|
||||||
|
file: path=/srv/http/domain/{{warehost_webclient_domain}} state=directory mode=0755 owner={{http_usr}} group={{http_grp}}
|
||||||
|
|
||||||
|
- name: Install rsync
|
||||||
|
apt: name=rsync
|
||||||
|
|
||||||
|
# does not work (https://github.com/ansible/ansible/issues/11873)
|
||||||
|
#- name: Copy generated files
|
||||||
|
# delegate_to: "{{ inventory_hostname }}"
|
||||||
|
# synchronize:
|
||||||
|
# src: /usr/src/warehost-client-web/build/
|
||||||
|
# dest: /srv/http/domain/{{warehost_webclient_domain}}/
|
||||||
|
# delete: True
|
||||||
|
|
||||||
|
- name: Copy files
|
||||||
|
command: >
|
||||||
|
rsync -a --delete
|
||||||
|
/usr/src/warehost-client-web/build/
|
||||||
|
/srv/http/domain/{{warehost_webclient_domain}}/
|
||||||
|
|
||||||
- name: Configurate caddy for warehost client web
|
- name: Configurate caddy for warehost client web
|
||||||
template: src=caddy.conf dest=/etc/caddy/hosts/79-warehost_client_web.act owner={{http_usr}} mode=0644
|
template: src=caddy.conf dest=/etc/caddy/hosts/79-warehost_client_web.act owner={{http_usr}} mode=0644
|
||||||
notify: reload caddy
|
notify: reload caddy
|
||||||
|
|
||||||
- name: Create domain folder for warehost client web
|
|
||||||
file: path=/srv/http/domain/{{warehost_webclient_domain}} state=directory mode=0755 owner={{http_usr}} group={{http_grp}}
|
|
||||||
|
|
Reference in New Issue