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
|
||||
apt: name={{ item }}
|
||||
with_items:
|
||||
- git
|
||||
- npm
|
||||
- name: Archlinux
|
||||
include: archlinux.yml
|
||||
when: (ansible_distribution == "Antergos") or (ansible_os_family == "Archlinux")
|
||||
|
||||
- name: Install global node packages
|
||||
npm: name={{item}} global=yes
|
||||
with_items:
|
||||
- grunt-cli
|
||||
- bower
|
||||
- name: Ubuntu
|
||||
include: ubuntu.yml
|
||||
when: (ansible_distribution == "Debian") or (ansible_distribution == "Ubuntu")
|
||||
|
||||
- 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 }}"
|
||||
|
|
|
@ -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}}
|
||||
gzip
|
||||
root /srv/http/domain/{{warehost_webclient_domain}}
|
||||
|
|
Reference in New Issue