diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index 9ea6637..e154799 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -12,7 +12,7 @@ dokku_ports: app: keycloak mappings: - - "http:80:8080" + - "http:80:{{ http_port }}" state: present - name: Setup LE certificates @@ -29,19 +29,19 @@ dokku_storage: app: keycloak mounts: - - "/home/dokku/keycloak/letsencrypt/certs/current/key.pem:/etc/x509/https/tls.key" - - "/home/dokku/keycloak/letsencrypt/certs/current/cert.pem:/etc/x509/https/tls.crt" + - /home/dokku/keycloak/letsencrypt/certs/current/key.pem:/etc/x509/https/tls.key + - /home/dokku/keycloak/letsencrypt/certs/current/cert.pem:/etc/x509/https/tls.crt - name: Remove automatically configured ports dokku_ports: app: keycloak mappings: - - "http:8080:8080" + - "http:{{ http_port }}:{{ http_port }}" state: absent - name: Set HTTP 443 port dokku_ports: app: keycloak mappings: - - "https:443:8080" + - "https:443:{{ http_port }}" state: present diff --git a/ansible/pre-deploy.yml b/ansible/pre-deploy.yml index 6bcb2ce..facd01d 100644 --- a/ansible/pre-deploy.yml +++ b/ansible/pre-deploy.yml @@ -16,7 +16,13 @@ state: present - name: Create mariadb database - shell: "dokku mariadb:create keycloak --password {{ db_passwd }} --root-password {{ root_db_passwd }}" + shell: " + dokku + mariadb:create + keycloak + --password {{ db_passwd }} + --root-password {{ root_db_passwd }} + " args: creates: /var/lib/dokku/services/mariadb/keycloak diff --git a/ansible/vars/all.yml b/ansible/vars/all.yml index d678d0e..227f9f3 100644 --- a/ansible/vars/all.yml +++ b/ansible/vars/all.yml @@ -1,3 +1,4 @@ --- autonomic_admin_mail: helo@autonomic.zone autonomic_admin_user: autonomic +http_port: "8080"