mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 02:30:22 -07:00
[PR #6396/c411e125 backport][stable-6] Setup docker (#6466)
Setup docker (#6396)
* setup-docker: install and run docker inside integration test VMs
* must pip install requests to satisfy community.docker requirements
* add Ubuntu configuration to setup_docker
* Update tests/integration/targets/mssql_script/tasks/main.yml
* Update tests/integration/targets/mssql_script/tasks/main.yml
* docker_pacakges variable non-existent by default
* add setup_docker to keycloak_groups
* add setup_docker to keycloak_groups
* removed unused file tasks/nothing.yml
* add README
* add copyright notice to readme file
* Update tests/integration/targets/setup_docker/README.md
* rolled back the boilerplate disclaimer to mssql_script tasks/main.yml
(cherry picked from commit c411e12555
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
49967547df
commit
6fd58ba388
18 changed files with 313 additions and 8 deletions
|
@ -3,6 +3,29 @@
|
|||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- name: Start container
|
||||
community.docker.docker_container:
|
||||
name: mykeycloak
|
||||
image: "quay.io/keycloak/keycloak:20.0.2"
|
||||
command: start-dev
|
||||
env:
|
||||
KC_HTTP_RELATIVE_PATH: /auth
|
||||
KEYCLOAK_ADMIN: admin
|
||||
KEYCLOAK_ADMIN_PASSWORD: password
|
||||
ports:
|
||||
- "8080:8080"
|
||||
detach: true
|
||||
auto_remove: true
|
||||
memory: 2200M
|
||||
|
||||
- name: Check default ports
|
||||
ansible.builtin.wait_for:
|
||||
host: "localhost"
|
||||
port: "8080"
|
||||
state: started # Port should be open
|
||||
delay: 30 # Wait before first check
|
||||
timeout: 50 # Stop checking after timeout (sec)
|
||||
|
||||
- name: Create a keycloak group
|
||||
community.general.keycloak_group:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
|
@ -13,6 +36,9 @@
|
|||
name: test-group
|
||||
state: present
|
||||
register: result
|
||||
retries: 3
|
||||
delay: 20
|
||||
until: result is not failed
|
||||
|
||||
- name: Assert group was created
|
||||
assert:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue