Merge branch 'keycloak-ansible-v2-format'
This commit is contained in:
commit
36cab46fee
@ -1,5 +1,3 @@
|
||||
FROM jboss/keycloak:9.0.2
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
echo $(pass show hosts/autonomic-dokku/vault/password)
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Load variables
|
||||
include_vars:
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/keycloak/vars/"
|
||||
extensions:
|
||||
- yml
|
||||
|
||||
- name: Set HTTP 80 port proxy
|
||||
dokku_ports:
|
||||
app: keycloak
|
||||
mappings:
|
||||
- "http:80:{{ http_port }}"
|
||||
state: present
|
||||
|
||||
- name: Setup LE certificates
|
||||
shell: dokku letsencrypt keycloak
|
||||
args:
|
||||
creates: /home/dokku/keycloak/letsencrypt/certs
|
||||
|
||||
- name: Setup LE certificates renew cron job
|
||||
shell: dokku letsencrypt:cron-job --add
|
||||
args:
|
||||
creates: /home/dokku/keycloak/letsencrypt/cron-job
|
||||
|
||||
- name: Remove automatically configured ports
|
||||
dokku_ports:
|
||||
app: keycloak
|
||||
mappings:
|
||||
- "http:{{ http_port }}:{{ http_port }}"
|
||||
state: absent
|
||||
|
||||
- name: Set HTTP 443 port
|
||||
dokku_ports:
|
||||
app: keycloak
|
||||
mappings:
|
||||
- "https:443:{{ http_port }}"
|
||||
state: present
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Load variables
|
||||
include_vars:
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/keycloak/vars/"
|
||||
extensions:
|
||||
- yml
|
||||
|
||||
- name: Configure id.autonomic.zone domain
|
||||
dokku_domains:
|
||||
app: keycloak
|
||||
domains:
|
||||
- id.autonomic.zone
|
||||
state: present
|
||||
|
||||
- name: Create mariadb database
|
||||
no_log: true
|
||||
shell: "
|
||||
dokku
|
||||
mariadb:create
|
||||
keycloak
|
||||
--password {{ db_passwd }}
|
||||
--root-password {{ root_db_passwd }}
|
||||
"
|
||||
args:
|
||||
creates: /var/lib/dokku/services/mariadb/keycloak
|
||||
|
||||
- name: Link mariadb database to application
|
||||
dokku_service_link:
|
||||
app: keycloak
|
||||
name: keycloak
|
||||
service: mariadb
|
||||
|
||||
- name: Specify mariadb docker volume mounts
|
||||
dokku_storage:
|
||||
app: keycloak
|
||||
mounts:
|
||||
- /var/lib/dokku/services/mariadb/keycloak:/var/lib/mysql
|
||||
|
||||
- name: Configure the dokku app environment
|
||||
dokku_config:
|
||||
app: keycloak
|
||||
restart: false
|
||||
config:
|
||||
DB_ADDR: "dokku-mariadb-keycloak:3306"
|
||||
DB_DATABASE: "keycloak"
|
||||
DB_PASSWORD: "{{ db_passwd }}"
|
||||
DB_USER: "mariadb" # https://github.com/dokku/dokku-mariadb/issues/89
|
||||
DB_VENDOR: "mariadb"
|
||||
DOKKU_LETSENCRYPT_EMAIL: "{{ autonomic_admin_mail }}"
|
||||
KEYCLOAK_PASSWORD: "{{ autonomic_admin_pass }}"
|
||||
KEYCLOAK_USER: "{{ autonomic_admin_user }}"
|
||||
PROXY_ADDRESS_FORWARDING: "{{ proxy_address_forwarding }}"
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
- src: dokku_bot.ansible_dokku
|
||||
version: v2020.3.24
|
||||
|
||||
- src: https://git.coop/decentral1se/autonomic.gandi/-/archive/0.0.5/autonomic.gandi-0.0.5.tar.gz
|
||||
name: autonomic.gandi
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
autonomic_admin_mail: helo@autonomic.zone
|
||||
autonomic_admin_user: autonomic
|
||||
http_port: "8080"
|
||||
proxy_address_forwarding: "true"
|
17
deploy.d/config.yml
Normal file
17
deploy.d/config.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
port: "8080"
|
||||
domain: "id.autonomic.zone"
|
||||
db:
|
||||
- type: "mariadb"
|
||||
passwd: "{{ db_passwd }}"
|
||||
root_passwd: "{{ root_db_passwd }}"
|
||||
env:
|
||||
DB_ADDR: "{{ dokku_mariadb_db_addr }}"
|
||||
DB_DATABASE: "keycloak_v2"
|
||||
DB_PASSWORD: "{{ db_passwd }}"
|
||||
DB_USER: "{{ dokku_mariadb_db_user }}"
|
||||
DB_VENDOR: "mariadb"
|
||||
DOKKU_LETSENCRYPT_EMAIL: "helo@autonomic.zone"
|
||||
KEYCLOAK_PASSWORD: "helo@autonomic.zone"
|
||||
KEYCLOAK_USER: "autonomic"
|
||||
PROXY_ADDRESS_FORWARDING: "true"
|
@ -1 +0,0 @@
|
||||
ansible==2.9.6
|
Reference in New Issue
Block a user