mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-06 10:50:31 -07:00
add custom image
This commit is contained in:
parent
2f2293c66f
commit
a06f2e811e
4 changed files with 42 additions and 30 deletions
14
molecule/default/Dockerfile.j2
Normal file
14
molecule/default/Dockerfile.j2
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
FROM registry.access.redhat.com/ubi9/python-311:latest
|
||||||
|
|
||||||
|
USER 0
|
||||||
|
|
||||||
|
CMD ["/sbin/init"]
|
||||||
|
|
||||||
|
STOPSIGNAL SIGRTMIN+3
|
||||||
|
|
||||||
|
#mask systemd-machine-id-commit.service - partial fix for https://bugzilla.redhat.com/show_bug.cgi?id=1472439
|
||||||
|
RUN systemctl mask systemd-remount-fs.service dev-hugepages.mount sys-fs-fuse-connections.mount systemd-logind.service getty.target console-getty.service systemd-udev-trigger.service systemd-udevd.service systemd-random-seed.service systemd-machine-id-commit.service
|
||||||
|
|
||||||
|
RUN dnf -y install sudo procps-ng && dnf clean all
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,6 @@
|
||||||
keycloak_quarkus_proxy_mode: none
|
keycloak_quarkus_proxy_mode: none
|
||||||
keycloak_quarkus_offline_install: true
|
keycloak_quarkus_offline_install: true
|
||||||
keycloak_quarkus_download_path: /tmp/keycloak/
|
keycloak_quarkus_download_path: /tmp/keycloak/
|
||||||
pre_tasks:
|
|
||||||
- name: "Install iproute"
|
|
||||||
become: true
|
|
||||||
ansible.builtin.dnf:
|
|
||||||
name:
|
|
||||||
- iproute
|
|
||||||
state: present
|
|
||||||
roles:
|
roles:
|
||||||
- role: keycloak_quarkus
|
- role: keycloak_quarkus
|
||||||
- role: keycloak_realm
|
- role: keycloak_realm
|
||||||
|
|
|
@ -3,13 +3,10 @@ driver:
|
||||||
name: docker
|
name: docker
|
||||||
platforms:
|
platforms:
|
||||||
- name: instance
|
- name: instance
|
||||||
image: registry.access.redhat.com/ubi9/ubi-init:latest
|
pre_build_image: false
|
||||||
pre_build_image: true
|
|
||||||
privileged: true
|
privileged: true
|
||||||
command: "/usr/sbin/init"
|
command: "/usr/sbin/init"
|
||||||
networks:
|
image: ubi9-py311-init:latest
|
||||||
- name: "mymongo"
|
|
||||||
network_mode: "mymongo"
|
|
||||||
port_bindings:
|
port_bindings:
|
||||||
- "8080/tcp"
|
- "8080/tcp"
|
||||||
- "8443/tcp"
|
- "8443/tcp"
|
||||||
|
@ -27,10 +24,11 @@ provisioner:
|
||||||
verify: verify.yml
|
verify: verify.yml
|
||||||
inventory:
|
inventory:
|
||||||
host_vars:
|
host_vars:
|
||||||
localhost:
|
instance:
|
||||||
ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
ansible_python_interpreter: "/bin/python3.11"
|
||||||
env:
|
env:
|
||||||
ANSIBLE_FORCE_COLOR: "true"
|
ANSIBLE_FORCE_COLOR: "true"
|
||||||
|
ANSIBLE_VERBOSITY: 3
|
||||||
verifier:
|
verifier:
|
||||||
name: ansible
|
name: ansible
|
||||||
scenario:
|
scenario:
|
||||||
|
|
|
@ -7,19 +7,26 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Run preparation common to all scenario"
|
- name: "Run preparation common to all scenario"
|
||||||
ansible.builtin.include_tasks: ../prepare.yml
|
ansible.builtin.include_tasks: ../prepare.yml
|
||||||
vars:
|
|
||||||
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"
|
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
var: ansible_python_version
|
var: ansible_python_version
|
||||||
|
|
||||||
- debug:
|
- command: id root
|
||||||
msg: "{{ ansible_facts.packages[item] }}"
|
- command: cat /etc/sudoers
|
||||||
loop: "{{ ansible_facts.packages | select('search', regex) }}"
|
|
||||||
vars:
|
- lineinfile:
|
||||||
regex: 'python*'
|
path: /etc/sudoers
|
||||||
|
regexp: '^root'
|
||||||
|
line: 'root ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
|
||||||
|
- command: cat /etc/sudoers
|
||||||
|
|
||||||
|
- name: "Install iproute"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.dnf:
|
||||||
|
name:
|
||||||
|
- iproute
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Create controller directory for downloads
|
- name: Create controller directory for downloads
|
||||||
ansible.builtin.file: # noqa risky-file-permissions delegated, uses controller host user
|
ansible.builtin.file: # noqa risky-file-permissions delegated, uses controller host user
|
||||||
|
@ -29,10 +36,10 @@
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: Download keycloak archive to controller directory
|
# - name: Download keycloak archive to controller directory
|
||||||
ansible.builtin.get_url: # noqa risky-file-permissions delegated, uses controller host user
|
# ansible.builtin.get_url: # noqa risky-file-permissions delegated, uses controller host user
|
||||||
url: https://github.com/keycloak/keycloak/releases/download/24.0.5/keycloak-24.0.5.zip
|
# url: https://github.com/keycloak/keycloak/releases/download/24.0.5/keycloak-24.0.5.zip
|
||||||
dest: /tmp/keycloak
|
# dest: /tmp/keycloak
|
||||||
mode: '0640'
|
# mode: '0640'
|
||||||
delegate_to: localhost
|
# delegate_to: localhost
|
||||||
run_once: true
|
# run_once: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue