quarkus scenario skip part if hera is used
parent
1b1127ed91
commit
ded44b084d
|
@ -6,18 +6,30 @@
|
||||||
ansible.builtin.yum:
|
ansible.builtin.yum:
|
||||||
name: sudo
|
name: sudo
|
||||||
state: present
|
state: present
|
||||||
- command: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj '/CN=instance'
|
|
||||||
|
- name: "Display hera_home if defined."
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
||||||
|
|
||||||
|
- ansible.builtin.command: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj '/CN=instance'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
- lineinfile:
|
|
||||||
|
- block:
|
||||||
|
- ansible.builtin.lineinfile:
|
||||||
dest: /etc/hosts
|
dest: /etc/hosts
|
||||||
line: "127.0.0.1 instance"
|
line: "127.0.0.1 instance"
|
||||||
state: present
|
state: present
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
become: yes
|
become: yes
|
||||||
- file:
|
when:
|
||||||
|
- hera_home is defined
|
||||||
|
- hera_home | length == 0
|
||||||
|
|
||||||
|
- ansible.builtin.file:
|
||||||
state: directory
|
state: directory
|
||||||
path: /opt/keycloak/keycloak-18.0.0/conf/
|
path: /opt/keycloak/keycloak-18.0.0/conf/
|
||||||
- copy:
|
|
||||||
|
- ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "/opt/keycloak/keycloak-18.0.0/conf/{{ item }}"
|
dest: "/opt/keycloak/keycloak-18.0.0/conf/{{ item }}"
|
||||||
mode: 0444
|
mode: 0444
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
that:
|
that:
|
||||||
- ansible_facts.services["keycloak.service"]["state"] == "running"
|
- ansible_facts.services["keycloak.service"]["state"] == "running"
|
||||||
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
|
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
||||||
|
|
||||||
|
- block:
|
||||||
- name: Fetch openID config
|
- name: Fetch openID config
|
||||||
shell: |
|
shell: |
|
||||||
curl https://instance:8443/realms/master/.well-known/openid-configuration -k | jq .
|
curl https://instance:8443/realms/master/.well-known/openid-configuration -k | jq .
|
||||||
|
@ -25,3 +30,6 @@
|
||||||
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/auth'
|
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/auth'
|
||||||
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/token'
|
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/token'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
when:
|
||||||
|
- hera_home is defined
|
||||||
|
- hera_home | length == 0
|
||||||
|
|
Loading…
Reference in New Issue