role warehostclient add archlinux support
This commit is contained in:
parent
ea9f2d7166
commit
1759eb5136
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
- name: Install packages
|
||||||
|
pacman: name={{ item }}
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
- npm
|
||||||
|
- rsync
|
||||||
|
|
||||||
|
- 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: node /bin/bower install --allow-root -s -q --config.interactive=false
|
||||||
|
args:
|
||||||
|
chdir: "/usr/src/warehost-client-web"
|
||||||
|
|
||||||
|
- name: Build warehost-client-web
|
||||||
|
command: node /bin/grunt build
|
||||||
|
args:
|
||||||
|
chdir: "/usr/src/warehost-client-web"
|
|
@ -1,41 +1,16 @@
|
||||||
---
|
---
|
||||||
- name: Install packages
|
- name: Archlinux
|
||||||
apt: name={{ item }}
|
include: archlinux.yml
|
||||||
with_items:
|
when: (ansible_distribution == "Antergos") or (ansible_os_family == "Archlinux")
|
||||||
- git
|
|
||||||
- npm
|
|
||||||
|
|
||||||
- name: Install global node packages
|
- name: Ubuntu
|
||||||
npm: name={{item}} global=yes
|
include: ubuntu.yml
|
||||||
with_items:
|
when: (ansible_distribution == "Debian") or (ansible_distribution == "Ubuntu")
|
||||||
- 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
|
- name: Create destination directory
|
||||||
file: path=/srv/http/domain/{{warehost_webclient_domain}} state=directory mode=0755 owner={{http_usr}} group={{http_grp}}
|
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)
|
# does not work (https://github.com/ansible/ansible/issues/11873)
|
||||||
#- name: Copy generated files
|
#- name: Copy generated files
|
||||||
# delegate_to: "{{ inventory_hostname }}"
|
# delegate_to: "{{ inventory_hostname }}"
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
- name: Install packages
|
||||||
|
apt: name={{ item }}
|
||||||
|
with_items:
|
||||||
|
- git
|
||||||
|
- npm
|
||||||
|
- rsync
|
||||||
|
|
||||||
|
- 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"
|
|
@ -1,4 +1,7 @@
|
||||||
http://{{warehost_webclient_domain}}, https://{{warehost_webclient_domain}} {
|
http://{{warehost_webclient_domain}} {
|
||||||
|
redir https://{{warehost_webclient_domain}}{uri}
|
||||||
|
}
|
||||||
|
https://{{warehost_webclient_domain}} {
|
||||||
tls {{caddy_ssl_mail}}
|
tls {{caddy_ssl_mail}}
|
||||||
gzip
|
gzip
|
||||||
root /srv/http/domain/{{warehost_webclient_domain}}
|
root /srv/http/domain/{{warehost_webclient_domain}}
|
||||||
|
|
Reference in New Issue