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-api/tasks/main.yml

35 lines
964 B
YAML

---
- name: Create users
user: name=warehost createhome=no
- name: Download Warehost (TODO current copy)
copy: src=warehost dest=/usr/local/bin/warehost owner=root group=root mode=0755
- name: Create config folder
file: path=/etc/warehost state=directory owner=warehost mode=0700
- name: Create log folder
file: path=/var/log/warehost state=directory owner=warehost mode=0700
- name: Configurate warehost
template: src=config.yml dest=/etc/warehost/api.conf owner=warehost mode=0600
notify: restart warehost
- name: Install service
template: src=warehost.unit dest=/lib/systemd/system/warehost.service owner=root mode=644
notify:
- reload daemon-reload
- restart warehost
- name: Enable warehost
service: name=warehost state=started enabled=yes
- name: Configurate per nginx
include: nginx.yml
when: warehost_webserver_type == "nginx"
- name: Configurate per caddy
include: caddy.yml
when: warehost_webserver_type == "caddy"