Merge those https tasks

This commit is contained in:
Luke Murphy
2020-04-13 16:01:48 +02:00
parent f7e6f005f1
commit 73bfc21bac
4 changed files with 11 additions and 28 deletions

View File

@ -1,10 +0,0 @@
---
- name: Setup lets encrypt certificates
shell: "dokku letsencrypt {{ app }}"
args:
creates: "/home/dokku/{{ app }}/letsencrypt/certs"
- name: Setup lets encrypt certificates renew cron job
shell: dokku letsencrypt:cron-job --add
args:
creates: "/home/dokku/{{ app }}/letsencrypt/cron-job"

View File

@ -6,18 +6,3 @@
- "{{ domain }}"
state: present
when: domain is defined
- name: Provide information on domain configuration
debug:
msg:
- "Dedicated domain discovered for the deployment of {{ app }}"
- "Your application will be available at https://{{ domain }}"
when: domain is defined
- name: Provide information on sub-domain configuration
debug:
msg:
- "No dedicated domain configured for the deployment of {{ app }}"
- "Dokku will provide a sub-domain configuration"
- "Your application will be available at https://{{ app }}.{{ dokku_hostname }}"
when: domain is not defined

View File

@ -1,4 +1,14 @@
---
- name: Setup lets encrypt certificates
shell: "dokku letsencrypt {{ app }}"
args:
creates: "/home/dokku/{{ app }}/letsencrypt/certs"
- name: Setup lets encrypt certificates renew cron job
shell: dokku letsencrypt:cron-job --add
args:
creates: "/home/dokku/{{ app }}/letsencrypt/cron-job"
- name: Set HTTP 443 port
dokku_ports:
app: "{{ app }}"