From 28f344571ef391b2f3b2b06a0829e55cec6d1216 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Tue, 20 Dec 2016 12:14:13 +0100 Subject: [PATCH] ftp-server works now --- warehost-api/tasks/main.yml | 2 +- warehost-ftp/defaults/main.yml | 2 +- warehost-ftp/tasks/main.yml | 3 ++- warehost-ftp/templates/config.yml | 2 +- warehost-host/handlers/main.yml | 3 --- warehost-host/tasks/main.yml | 2 -- warehost-web/tasks/main.yml | 1 + 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/warehost-api/tasks/main.yml b/warehost-api/tasks/main.yml index 1c270ae..f29e861 100644 --- a/warehost-api/tasks/main.yml +++ b/warehost-api/tasks/main.yml @@ -1,6 +1,7 @@ --- - name: Download Warehost get_url: url=https://warehost.sum7.eu/downloads/current/warehost-api dest=/usr/local/bin/warehost-api owner=root group=root mode=0755 + notify: restart warehost-api - name: Configurate warehost template: src=config.yml dest=/etc/warehost/api.conf owner=warehost mode=0600 @@ -15,7 +16,6 @@ - name: Enable warehost service: name=warehost-api state=started enabled=yes - - name: Configurate per nginx include: nginx.yml when: warehost_webserver_type == "nginx" diff --git a/warehost-ftp/defaults/main.yml b/warehost-ftp/defaults/main.yml index 397f9b1..e0cb6a2 100644 --- a/warehost-ftp/defaults/main.yml +++ b/warehost-ftp/defaults/main.yml @@ -1,7 +1,7 @@ --- warehost_db_host: localhost warehost_ftp_port: 21 -warehost_ftp_data_path: /srv/ftp +warehost_ftp_own_path: /srv/ftp warehost_ftp_host_path: /srv/http/domain warehost_ftp_web_path: /srv/http/web http_grp: http diff --git a/warehost-ftp/tasks/main.yml b/warehost-ftp/tasks/main.yml index 758deeb..975b5fb 100644 --- a/warehost-ftp/tasks/main.yml +++ b/warehost-ftp/tasks/main.yml @@ -1,9 +1,10 @@ --- - name: Download Warehost-ftp get_url: url=https://warehost.sum7.eu/downloads/current/warehost-ftp dest=/usr/local/bin/warehost-ftp owner=root group=root mode=0755 + notify: restart warehost-ftp - name: Create data folder - file: path={{warehost_ftp_data_path}} state=directory owner=warehost group={{http_grp}} mode=0770 + file: path={{warehost_ftp_own_path}} state=directory owner=warehost group={{http_grp}} mode=0770 - name: Configurate warehost template: src=config.yml dest=/etc/warehost/ftp.conf owner=warehost mode=0600 diff --git a/warehost-ftp/templates/config.yml b/warehost-ftp/templates/config.yml index 323ae9a..39ca027 100644 --- a/warehost-ftp/templates/config.yml +++ b/warehost-ftp/templates/config.yml @@ -4,6 +4,6 @@ log: path: /var/log/warehost/ftp.log databasedebug: false port: {{warehost_ftp_port}} -data: {{warehost_ftp_data_path}}/%d/ +own: {{warehost_ftp_own_path}}/%d/ host: {{warehost_ftp_host_path}}/%s/ web: {{warehost_ftp_web_path}}/%d/ diff --git a/warehost-host/handlers/main.yml b/warehost-host/handlers/main.yml index e37b0a1..a39bbee 100644 --- a/warehost-host/handlers/main.yml +++ b/warehost-host/handlers/main.yml @@ -1,6 +1,3 @@ --- - name: reload daemon-reload command: systemctl daemon-reload - -- name: restart warehost-host - service: name=warehost-host.timer state=restarted diff --git a/warehost-host/tasks/main.yml b/warehost-host/tasks/main.yml index 49cbbd0..41b5bb3 100644 --- a/warehost-host/tasks/main.yml +++ b/warehost-host/tasks/main.yml @@ -4,11 +4,9 @@ - name: Configurate warehost-host template: src=config.yml dest=/etc/warehost/host.conf owner=warehost mode=0600 - notify: restart warehost-host - name: Configurate host template template: src={{warehost_host_web_type}}.conf dest=/etc/warehost/host-web.tmpl owner=warehost mode=0600 - notify: restart warehost-host - name: Configurate warehost-host file: path={{warehost_host_web_path}} state=touch owner=warehost group={{http_grp}} mode=0660 diff --git a/warehost-web/tasks/main.yml b/warehost-web/tasks/main.yml index bab47a3..308fb75 100644 --- a/warehost-web/tasks/main.yml +++ b/warehost-web/tasks/main.yml @@ -1,6 +1,7 @@ --- - name: Download Warehost-web get_url: url=https://warehost.sum7.eu/downloads/current/warehost-web dest=/usr/local/bin/warehost-web owner=root group=root mode=0755 + notify: restart warehost-web - name: Create web folder file: path={{warehost_web_webroot}} state=directory owner=warehost group={{http_grp}} mode=0770