This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-warehost/warehost-client-web/tasks/main.yml

31 lines
1017 B
YAML

---
- name: Archlinux
include: archlinux.yml
when: (ansible_distribution == "Antergos") or (ansible_os_family == "Archlinux")
- name: Ubuntu
include: ubuntu.yml
when: (ansible_distribution == "Debian") or (ansible_distribution == "Ubuntu")
- name: Create destination directory
file: path=/srv/http/domain/{{warehost_webclient_domain}} state=directory mode=0755 owner={{http_usr}} group={{http_grp}}
# 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
template: src=caddy.conf dest=/etc/caddy/hosts/79-warehost_client_web.act owner={{http_usr}} mode=0644
notify: reload caddy