--- - name: Manage the JCliff installation on Ubuntu/Debian block: - name: Download the jcliff distribution unarchive: remote_src: yes src: 'https://github.com/bserdar/jcliff/releases/download/v{{ keycloak_jcliff_version }}/jcliff-{{ keycloak_jcliff_version }}-dist.tar.gz' dest: '/opt' owner: root group: root - name: Fix the jcliff executable permissions file: dest: '/opt/jcliff-{{ keycloak_jcliff_version }}/jcliff' mode: '0755' - name: Link to the executable file: src: '/opt/jcliff-{{ keycloak_jcliff_version }}/jcliff' dest: /usr/bin/jcliff state: link - name: Link to the shared resources file: src: '/opt/jcliff-{{ keycloak_jcliff_version }}' dest: /usr/share/jcliff state: link - name: Set the JBOSS_HOME as {{ jboss_home }} in the global environment profile template: src: jboss-env.sh.j2 dest: /etc/profile.d/jboss-env.sh owner: root group: root mode: '0444' when: ansible_distribution_file_variety == "Debian" tags: [ keycloak, jcliff ] - import_tasks: keycloak-install.yml - import_tasks: keycloak-jdbc.yml - import_tasks: keycloak-configuration.yml - name: Manage the keycloak service block: - name: Install the keycloak properties file template: src: wildfly.properties.j2 dest: '{{ keycloak_properties_directory }}/wildfly.properties' owner: root group: root mode: '0444' notify: Restart Keycloak - name: Install the keycloak systemd unit 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 systemd: daemon_reload: yes when: keycloak_unit is changed # - name: ensure that the keycloak service is running and enabled # service: name=keycloak state=started enabled=yes tags: [ 'keycloak', 'keycloak_service', 'keycloak_conf' ]