Group plays to hooks
This commit is contained in:
7
plays/postdeploy/lib/http.yml
Normal file
7
plays/postdeploy/lib/http.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Set HTTP 80 port proxy
|
||||
dokku_ports:
|
||||
app: "{{ app }}"
|
||||
mappings:
|
||||
- "http:80:{{ port }}"
|
||||
state: present
|
17
plays/postdeploy/lib/https.yml
Normal file
17
plays/postdeploy/lib/https.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- 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 }}"
|
||||
mappings:
|
||||
- "https:443:{{ port }}"
|
||||
state: present
|
7
plays/postdeploy/lib/proxy.yml
Normal file
7
plays/postdeploy/lib/proxy.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Remove automatically configured ports
|
||||
dokku_ports:
|
||||
app: "{{ app }}"
|
||||
mappings:
|
||||
- "http:{{ port }}:{{ port }}"
|
||||
state: absent
|
8
plays/postdeploy/postdeploy.yml
Normal file
8
plays/postdeploy/postdeploy.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include: ../commonlib/vars.yml
|
||||
- include: ./lib/http.yml
|
||||
- include: ./lib/https.yml
|
||||
- include: ./lib/proxy.yml
|
Reference in New Issue
Block a user