keycloak_quarkus: add https to molecule test setup (#36)

* keycloak_quarkus: add https to molecule test setup

* move converge pre_tasks to prepare phase

* Update zipfile unarchive to cater for existing certs
This commit is contained in:
Guido Grazioli 2022-05-31 19:07:18 +02:00 committed by GitHub
commit 76cbb4c676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 65 additions and 12 deletions

View file

@ -84,9 +84,9 @@
- local_archive_path.stat.exists
become: yes
- name: "Check target directory: {{ keycloak.home }}"
- name: "Check target directory: {{ keycloak.home }}/bin/"
ansible.builtin.stat:
path: "{{ keycloak.home }}"
path: "{{ keycloak.home }}/bin/"
register: path_to_workdir
become: yes
@ -95,12 +95,12 @@
remote_src: yes
src: "{{ archive }}"
dest: "{{ keycloak_quarkus_dest }}"
creates: "{{ keycloak.home }}"
creates: "{{ keycloak.home }}/bin/"
owner: "{{ keycloak.service_user }}"
group: "{{ keycloak.service_group }}"
become: yes
when:
- new_version_downloaded.changed or not path_to_workdir.stat.exists
- (not path_to_workdir.stat.exists) or new_version_downloaded.changed
notify:
- restart keycloak
@ -108,4 +108,4 @@
ansible.builtin.debug:
msg: "{{ keycloak.home }} already exists and version unchanged, skipping decompression"
when:
- not new_version_downloaded.changed and path_to_workdir.stat.exists
- (not new_version_downloaded.changed) and path_to_workdir.stat.exists

View file

@ -41,6 +41,14 @@
notify:
- restart keycloak
- name: Ensure logdirectory exists
ansible.builtin.file:
state: directory
path: "{{ keycloak.home }}/{{ keycloak.log.file | dirname }}"
owner: "{{ keycloak.service_user }}"
group: "{{ keycloak.service_group }}"
mode: 0775
- name: "Start and wait for keycloak service"
ansible.builtin.include_tasks: start.yml
@ -52,6 +60,6 @@
- name: Link default logs directory
ansible.builtin.file:
state: link
src: "{{ keycloak.home }}/{{ keycloak.log.file }}"
src: "{{ keycloak.home }}/{{ keycloak.log.file | dirname }}"
dest: /var/log/keycloak
force: yes