From 2a18f55e346c20cc4f7d93af89b6568744b7136f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 19 Jan 2017 20:21:18 +0100 Subject: [PATCH] library/roles/zulip: Add a basic zulip role. It only downloads the distribution. Installation and configuration are scripted and interactive. --- zulip/defaults/main.yml | 7 +++++++ zulip/tasks/main.yml | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 zulip/defaults/main.yml create mode 100644 zulip/tasks/main.yml diff --git a/zulip/defaults/main.yml b/zulip/defaults/main.yml new file mode 100644 index 0000000..fd8cfbd --- /dev/null +++ b/zulip/defaults/main.yml @@ -0,0 +1,7 @@ +--- +zulip_install: False +zulip_download_url: 'https://www.zulip.com/dist/releases/{{ zulip_distrib_file }}' +zulip_distrib_file: zulip-server-latest.tar.gz +zulip_ssl_cert_file: /etc/ssl/certs/zulip.combined-chain.crt +zulip_ssl_key_file: /etc/ssl/private/zulip.key + diff --git a/zulip/tasks/main.yml b/zulip/tasks/main.yml new file mode 100644 index 0000000..cc64fff --- /dev/null +++ b/zulip/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- block: + - name: Unpack the zulip distribution + unarchive: src={{ zulip_download_url }} dest=/srv remote_src=yes + + - name: Setup a link for the ssl certificate file + file: src={{ letsencrypt_acme_certs_dir }}/fullchain dest={{ zulip_ssl_cert_file }} state=link + when: letsencrypt_acme_install + + - name: Setup a link for the ssl key file + file: src={{ letsencrypt_acme_certs_dir }}/privkey dest={{ zulip_ssl_key_file }} state=link + when: letsencrypt_acme_install + + when: zulip_install + tags: [ 'zulip' ] +