Merge those https tasks

This commit is contained in:
Luke Murphy 2020-04-13 16:01:48 +02:00
parent f7e6f005f1
commit 73bfc21bac
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
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 }}" - "{{ domain }}"
state: present state: present
when: domain is defined 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 - name: Set HTTP 443 port
dokku_ports: dokku_ports:
app: "{{ app }}" app: "{{ app }}"

View File

@ -13,11 +13,9 @@
- name: Include http tasks - name: Include http tasks
include: ./lib/http.yml include: ./lib/http.yml
- name: Include certs tasks
include: ./lib/certs.yml
- name: Include https tasks - name: Include https tasks
include: ./lib/https.yml include: ./lib/https.yml
when: https is defined and https == true
- name: Include proxy tasks - name: Include proxy tasks
include: ./lib/proxy.yml include: ./lib/proxy.yml