mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-06 19:00:28 -07:00
Do not require hosts edit for running quarkus molecule suite
This commit is contained in:
parent
00e6cb6b0e
commit
307eee771f
2 changed files with 4 additions and 19 deletions
|
@ -7,26 +7,11 @@
|
||||||
name: sudo
|
name: sudo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: "Display hera_home if defined."
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
|
||||||
|
|
||||||
- name: Create certificate request
|
- name: Create certificate request
|
||||||
ansible.builtin.command: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj '/CN=instance'
|
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
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
- name: Set /etc/hosts
|
|
||||||
ansible.builtin.lineinfile:
|
|
||||||
dest: /etc/hosts
|
|
||||||
line: "127.0.0.1 instance"
|
|
||||||
state: present
|
|
||||||
delegate_to: localhost
|
|
||||||
become: yes
|
|
||||||
when:
|
|
||||||
- hera_home is defined
|
|
||||||
- hera_home | length == 0
|
|
||||||
|
|
||||||
- name: Create conf directory # risky-file-permissions in test user account does not exist yet
|
- name: Create conf directory # risky-file-permissions in test user account does not exist yet
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: directory
|
state: directory
|
||||||
|
|
|
@ -16,11 +16,14 @@
|
||||||
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
hera_home: "{{ lookup('env', 'HERA_HOME') }}"
|
||||||
|
|
||||||
- name: Verify openid config
|
- name: Verify openid config
|
||||||
|
when:
|
||||||
|
- hera_home is defined
|
||||||
|
- hera_home | length == 0
|
||||||
block:
|
block:
|
||||||
- name: Fetch openID config # noqa blocked_modules command-instead-of-module
|
- name: Fetch openID config # noqa blocked_modules command-instead-of-module
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
curl https://instance:8443/realms/master/.well-known/openid-configuration -k | jq .
|
curl -H 'Host: instance' https://localhost:8443/realms/master/.well-known/openid-configuration -k | jq .
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
@ -34,6 +37,3 @@
|
||||||
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/auth'
|
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/auth'
|
||||||
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/token'
|
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/token'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when:
|
|
||||||
- hera_home is defined
|
|
||||||
- hera_home | length == 0
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue