molecule: cleanup prepare to use one play

This commit is contained in:
Romain Pelisse 2024-02-22 11:22:32 +01:00
commit 7324f48e8d
3 changed files with 43 additions and 37 deletions

View file

@ -1,13 +1,4 @@
---
- name: Prepare
hosts: all
tasks:
- name: Install sudo
ansible.builtin.yum:
name:
- java-1.8.0-openjdk
state: present
- name: Prepare
hosts: all
gather_facts: yes
@ -20,3 +11,12 @@
assets:
- "{{ assets_server }}/sso/7.6.0/rh-sso-7.6.0-server-dist.zip"
- "{{ assets_server }}/sso/7.6.1/rh-sso-7.6.1-patch.zip"
- name: Install JDK8
become: yes
ansible.builtin.yum:
name:
- java-1.8.0-openjdk
state: present

View file

@ -56,6 +56,9 @@
ansible.builtin.assert:
that:
- (keycloak_query_clients.json | selectattr('clientId','equalto','TestClient') | first)["attributes"]["post.logout.redirect.uris"] == '/public/logout'
- name: "Privilege escalation as some files/folders may requires it"
become: yes
block:
- name: Check log folder
ansible.builtin.stat:
path: "/tmp/keycloak"

View file

@ -1,6 +1,9 @@
---
- name: Prepare
hosts: all
gather_facts: yes
vars:
sudo_pkg_name: sudo
tasks:
- name: "Run preparation common to all scenario"
ansible.builtin.include_tasks: ../prepare.yml