31 lines
808 B
YAML
31 lines
808 B
YAML
---
|
|
- import_tasks: keycloak-install.yml
|
|
- import_tasks: keycloak-letsencrypt.yml
|
|
- import_tasks: keycloak-providers.yml
|
|
- import_tasks: keycloak-configuration.yml
|
|
|
|
- name: Manage the keycloak service
|
|
block:
|
|
- name: Install the keycloak systemd unit
|
|
ansible.builtin.template:
|
|
src: keycloak.service.j2
|
|
dest: /etc/systemd/system/keycloak.service
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: Restart Keycloak
|
|
register: keycloak_unit
|
|
|
|
- name: Reload systemd
|
|
ansible.builtin.systemd:
|
|
daemon_reload: yes
|
|
when: keycloak_unit is changed
|
|
|
|
- name: ensure that the keycloak service is running and enabled
|
|
ansible.builtin.service:
|
|
name: keycloak
|
|
state: started
|
|
enabled: true
|
|
|
|
tags: ['keycloak', 'keycloak_service', 'keycloak_conf']
|