From b8aacc4f3be06ef7391cb72d68f87006691c6b28 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Wed, 7 Dec 2016 14:43:11 +0100 Subject: [PATCH] add warehost-client-web --- warehost-client-web/defaults/main.yml | 3 +++ warehost-client-web/handlers/main.yml | 3 +++ warehost-client-web/tasks/main.yml | 7 +++++++ warehost-client-web/templates/caddy.conf | 5 +++++ warehost-host/templates/warehost-host.service | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 warehost-client-web/defaults/main.yml create mode 100644 warehost-client-web/handlers/main.yml create mode 100644 warehost-client-web/tasks/main.yml create mode 100644 warehost-client-web/templates/caddy.conf diff --git a/warehost-client-web/defaults/main.yml b/warehost-client-web/defaults/main.yml new file mode 100644 index 0000000..4f18011 --- /dev/null +++ b/warehost-client-web/defaults/main.yml @@ -0,0 +1,3 @@ +warehost_webclient_domain: warehost.de +warehost_webclient_repo: git@dev.sum7.eu:sum7/warehost-client-web.git +warehost_webclient_version: master diff --git a/warehost-client-web/handlers/main.yml b/warehost-client-web/handlers/main.yml new file mode 100644 index 0000000..a3afb82 --- /dev/null +++ b/warehost-client-web/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: reload caddy + service: name=caddy state=reloaded diff --git a/warehost-client-web/tasks/main.yml b/warehost-client-web/tasks/main.yml new file mode 100644 index 0000000..9a0d28a --- /dev/null +++ b/warehost-client-web/tasks/main.yml @@ -0,0 +1,7 @@ +--- +- 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 + +- 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}} diff --git a/warehost-client-web/templates/caddy.conf b/warehost-client-web/templates/caddy.conf new file mode 100644 index 0000000..f794549 --- /dev/null +++ b/warehost-client-web/templates/caddy.conf @@ -0,0 +1,5 @@ +http://{{warehost_webclient_domain}}, https://{{warehost_webclient_domain}} { + tls {{caddy_ssl_mail}} + gzip + root /srv/http/domain/{{warehost_webclient_domain}} +} diff --git a/warehost-host/templates/warehost-host.service b/warehost-host/templates/warehost-host.service index 0862b7d..4105fea 100644 --- a/warehost-host/templates/warehost-host.service +++ b/warehost-host/templates/warehost-host.service @@ -9,7 +9,7 @@ Type=oneshot User=warehost ExecStart=/usr/local/bin/warehost-host -c /etc/warehost/host.conf PermissionsStartOnly=true -ExecStartPost=/usr/bin/systemctl reload {{warehost_host_web_type}} +ExecStartPost=/bin/systemctl reload {{warehost_host_web_type}} [Install] WantedBy=multi-user.target