-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from guidograzioli/multi_distro_refactor
Multi distro refactor
- Loading branch information
Showing
29 changed files
with
244 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
vars: | ||
keycloak_quarkus_admin_pass: "remembertochangeme" | ||
keycloak_realm: TestRealm | ||
keycloak_quarkus_log: file | ||
keycloak_quarkus_frontend_url: 'http://localhost:8080/' | ||
keycloak_quarkus_start_dev: True | ||
keycloak_quarkus_proxy_mode: none | ||
keycloak_client_default_roles: | ||
- TestRoleAdmin | ||
- TestRoleUser | ||
keycloak_client_users: | ||
- username: TestUser | ||
password: password | ||
client_roles: | ||
- client: TestClient | ||
role: TestRoleUser | ||
- username: TestAdmin | ||
password: password | ||
client_roles: | ||
- client: TestClient | ||
role: TestRoleUser | ||
- client: TestClient | ||
role: TestRoleAdmin | ||
keycloak_clients: | ||
- name: TestClient | ||
roles: "{{ keycloak_client_default_roles }}" | ||
public_client: "{{ keycloak_client_public }}" | ||
web_origins: "{{ keycloak_client_web_origins }}" | ||
users: "{{ keycloak_client_users }}" | ||
client_id: TestClient | ||
attributes: | ||
post.logout.redirect.uris: '/public/logout' | ||
roles: | ||
- role: keycloak_quarkus | ||
- role: keycloak_realm | ||
keycloak_realm: TestRealm | ||
keycloak_admin_password: "remembertochangeme" | ||
keycloak_context: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: ghcr.io/hspaans/molecule-containers:debian-11 | ||
pre_build_image: true | ||
privileged: true | ||
port_bindings: | ||
- "8080/tcp" | ||
- "8443/tcp" | ||
- "8009/tcp" | ||
cgroupns_mode: host | ||
command: "/lib/systemd/systemd" | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
provisioner: | ||
name: ansible | ||
config_options: | ||
defaults: | ||
interpreter_python: auto_silent | ||
ssh_connection: | ||
pipelining: false | ||
playbooks: | ||
prepare: prepare.yml | ||
converge: converge.yml | ||
verify: verify.yml | ||
inventory: | ||
host_vars: | ||
localhost: | ||
ansible_python_interpreter: /usr/bin/python3 | ||
env: | ||
ANSIBLE_FORCE_COLOR: "true" | ||
ANSIBLE_REMOTE_TMP: /tmp/.ansible/tmp | ||
verifier: | ||
name: ansible | ||
scenario: | ||
test_sequence: | ||
- cleanup | ||
- destroy | ||
- create | ||
- prepare | ||
- converge | ||
- idempotence | ||
- side_effect | ||
- verify | ||
- cleanup | ||
- destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
gather_facts: yes | ||
tasks: | ||
- name: Install sudo | ||
ansible.builtin.apt: | ||
name: | ||
- sudo | ||
- openjdk-17-jdk-headless | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../roles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
vars: | ||
keycloak_admin_password: "remembertochangeme" | ||
keycloak_uri: "http://localhost:{{ 8080 + ( keycloak_jboss_port_offset | default(0) ) }}" | ||
keycloak_management_port: "http://localhost:{{ 9990 + ( keycloak_jboss_port_offset | default(0) ) }}" | ||
keycloak_jboss_port_offset: 10 | ||
tasks: | ||
- name: Populate service facts | ||
ansible.builtin.service_facts: | ||
|
||
- name: Check if keycloak service started | ||
ansible.builtin.assert: | ||
that: | ||
- ansible_facts.services["keycloak.service"]["state"] == "running" | ||
- ansible_facts.services["keycloak.service"]["status"] == "enabled" | ||
|
||
- name: Verify openid config | ||
block: | ||
- name: Fetch openID config # noqa blocked_modules command-instead-of-module | ||
ansible.builtin.shell: | | ||
set -o pipefail | ||
curl http://localhost:8080/realms/master/.well-known/openid-configuration -k | jq . | ||
args: | ||
executable: /bin/bash | ||
delegate_to: localhost | ||
register: openid_config | ||
changed_when: False | ||
- name: Verify endpoint URLs | ||
ansible.builtin.assert: | ||
that: | ||
- (openid_config.stdout | from_json)["backchannel_authentication_endpoint"] == 'http://localhost:8080/realms/master/protocol/openid-connect/ext/ciba/auth' | ||
- (openid_config.stdout | from_json)['issuer'] == 'http://localhost:8080/realms/master' | ||
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'http://localhost:8080/realms/master/protocol/openid-connect/auth' | ||
- (openid_config.stdout | from_json)['token_endpoint'] == 'http://localhost:8080/realms/master/protocol/openid-connect/token' | ||
delegate_to: localhost | ||
when: | ||
- hera_home is defined | ||
- hera_home | length == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.