|
|
|
|
@ -1,33 +1,37 @@
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
### tags:
|
|
|
|
|
### update_deployment
|
|
|
|
|
### update_realms
|
|
|
|
|
|
|
|
|
|
- name: "Setup DNS configuration for {{ inventory_hostname }}"
|
|
|
|
|
include_role:
|
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
|
name: hetzner-ansible-dns
|
|
|
|
|
vars:
|
|
|
|
|
record_data: "{{ stage_server_ip }}"
|
|
|
|
|
record_name: "{{ inventory_hostname }}"
|
|
|
|
|
|
|
|
|
|
- name: "Check if {{ inventory_hostname }}/docker-compose.yml exists"
|
|
|
|
|
stat:
|
|
|
|
|
path: '{{ service_base_path }}/{{ inventory_hostname }}/docker-compose.yml'
|
|
|
|
|
ansible.builtin.stat:
|
|
|
|
|
path: "{{ service_base_path }}/{{ inventory_hostname }}/docker-compose.yml"
|
|
|
|
|
register: check_docker_compose_file
|
|
|
|
|
tags:
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Configure Traefik labels to restrict access to admin console"
|
|
|
|
|
ansible.builtin.include_tasks: _configure_traefik.yml
|
|
|
|
|
tags:
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Stop {{ inventory_hostname }}"
|
|
|
|
|
community.docker.docker_compose:
|
|
|
|
|
project_src: '{{ service_base_path }}/{{ inventory_hostname }}'
|
|
|
|
|
project_src: "{{ service_base_path }}/{{ inventory_hostname }}"
|
|
|
|
|
state: absent
|
|
|
|
|
when: check_docker_compose_file.stat.exists
|
|
|
|
|
tags:
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Deploy docker templates for {{ inventory_hostname }}"
|
|
|
|
|
include_role:
|
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
|
name: hetzner-ansible-sma-deploy
|
|
|
|
|
tasks_from: templates
|
|
|
|
|
vars:
|
|
|
|
|
@ -41,7 +45,7 @@
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Deploy service templates for {{ inventory_hostname }}"
|
|
|
|
|
include_role:
|
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
|
name: hetzner-ansible-sma-deploy
|
|
|
|
|
tasks_from: templates
|
|
|
|
|
vars:
|
|
|
|
|
@ -55,22 +59,22 @@
|
|
|
|
|
|
|
|
|
|
- name: "Start {{ inventory_hostname }}"
|
|
|
|
|
community.docker.docker_compose:
|
|
|
|
|
project_src: '{{ service_base_path }}/{{ inventory_hostname }}'
|
|
|
|
|
project_src: "{{ service_base_path }}/{{ inventory_hostname }}"
|
|
|
|
|
state: present
|
|
|
|
|
pull: yes
|
|
|
|
|
pull: true
|
|
|
|
|
tags:
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Wait for <localhost:{{ service_port_keycloak_external }}>"
|
|
|
|
|
wait_for:
|
|
|
|
|
ansible.builtin.wait_for:
|
|
|
|
|
host: "localhost"
|
|
|
|
|
port: '{{ service_port_keycloak_external }}'
|
|
|
|
|
port: "{{ service_port_keycloak_external }}"
|
|
|
|
|
delay: 60
|
|
|
|
|
tags:
|
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
- name: "Authenticate on keycloak for {{ inventory_hostname }}"
|
|
|
|
|
include_role:
|
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
|
name: keycloak
|
|
|
|
|
tasks_from: _authenticate
|
|
|
|
|
tags:
|
|
|
|
|
@ -88,18 +92,18 @@
|
|
|
|
|
account_theme: "{{ keycloak_default_theme }}"
|
|
|
|
|
admin_theme: "{{ keycloak_default_theme }}"
|
|
|
|
|
login_theme: "{{ keycloak_default_theme }}"
|
|
|
|
|
registration_allowed: no
|
|
|
|
|
reset_password_allowed: no
|
|
|
|
|
login_with_email_allowed: no
|
|
|
|
|
duplicate_emails_allowed: yes
|
|
|
|
|
internationalization_enabled: yes
|
|
|
|
|
registration_allowed: false
|
|
|
|
|
reset_password_allowed: false
|
|
|
|
|
login_with_email_allowed: false
|
|
|
|
|
duplicate_emails_allowed: true
|
|
|
|
|
internationalization_enabled: true
|
|
|
|
|
default_locale: "de"
|
|
|
|
|
supported_locales:
|
|
|
|
|
- "de"
|
|
|
|
|
- "en"
|
|
|
|
|
events_enabled: yes
|
|
|
|
|
events_enabled: true
|
|
|
|
|
events_expiration: 604800
|
|
|
|
|
admin_events_enabled: yes
|
|
|
|
|
admin_events_enabled: true
|
|
|
|
|
smtp_server:
|
|
|
|
|
host: "{{ shared_service_mail_hostname }}"
|
|
|
|
|
from: "{{ keycloak_id }}@smardigo.digital"
|
|
|
|
|
|