This repository has been archived on 2020-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
drone-docker-runner.autonom.../ansible/post-deploy.yml

41 lines
1.0 KiB
YAML
Raw Normal View History

2020-03-24 12:57:22 +00:00
---
- hosts: all
gather_facts: false
tasks:
- name: Load variables
include_vars:
2020-03-24 14:46:51 +00:00
dir: "{{ dokku_lib_root }}/data/ansible/drone-docker-runner/vars/"
2020-03-24 12:57:22 +00:00
extensions:
- yml
- name: Set HTTP 80 port proxy
dokku_ports:
2020-03-24 14:46:51 +00:00
app: drone-docker-runner
2020-03-24 12:57:22 +00:00
mappings:
2020-03-24 14:46:51 +00:00
- "http:80:3000"
2020-03-24 12:57:22 +00:00
state: present
- name: Setup LE certificates
2020-03-24 14:46:51 +00:00
shell: dokku letsencrypt drone-docker-runner
2020-03-24 12:57:22 +00:00
args:
2020-03-24 14:46:51 +00:00
creates: /home/dokku/drone-docker-runner/letsencrypt/certs
2020-03-24 12:57:22 +00:00
- name: Setup LE certificates renew cron job
shell: dokku letsencrypt:cron-job --add
args:
2020-03-24 14:46:51 +00:00
creates: /home/dokku/drone-docker-runner/letsencrypt/cron-job
2020-03-24 12:57:22 +00:00
- name: Remove automatically configured ports
dokku_ports:
2020-03-24 14:46:51 +00:00
app: drone-docker-runner
2020-03-24 12:57:22 +00:00
mappings:
2020-03-24 14:46:51 +00:00
- "http:3000:3000"
2020-03-24 12:57:22 +00:00
state: absent
- name: Set HTTP 443 port
dokku_ports:
2020-03-24 14:46:51 +00:00
app: drone-docker-runner
2020-03-24 12:57:22 +00:00
mappings:
2020-03-24 14:46:51 +00:00
- "https:443:3000"
2020-03-24 12:57:22 +00:00
state: present