From c7c91a8b92dbf1d0f26ab328bd4a8fd1122dc135 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 24 Mar 2020 23:08:57 +0100 Subject: [PATCH] Revert "Disable post-deploy for now" This reverts commit bb13dd2b6f2d095e56e477f34b99e7f3afa5f7dc. --- ansible/post-deploy.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ansible/post-deploy.yml diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml new file mode 100644 index 0000000..e9b129c --- /dev/null +++ b/ansible/post-deploy.yml @@ -0,0 +1,40 @@ +--- +- hosts: all + gather_facts: false + tasks: + - name: Load variables + include_vars: + dir: "{{ dokku_lib_root }}/data/ansible/drone/vars/" + extensions: + - yml + + - name: Set HTTP 80 port proxy + dokku_ports: + app: drone + mappings: + - "http:80:80" + state: present + + - name: Setup LE certificates + shell: dokku letsencrypt drone + args: + creates: /home/dokku/drone/letsencrypt/certs + + - name: Setup LE certificates renew cron job + shell: dokku letsencrypt:cron-job --add + args: + creates: /home/dokku/drone/letsencrypt/cron-job + + - name: Remove automatically configured ports + dokku_ports: + app: drone + mappings: + - "http:80:80" + state: absent + + - name: Set HTTP 443 port + dokku_ports: + app: drone + mappings: + - "https:443:80" + state: present