mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-10 12:50:28 -07:00
#222 Migrate to middleware_automation.common.maven_artifact
This commit is contained in:
parent
26316ddc50
commit
d2ece93c12
4 changed files with 8 additions and 9 deletions
|
@ -4,4 +4,4 @@
|
||||||
# pip install -r requirements.txt
|
# pip install -r requirements.txt
|
||||||
#
|
#
|
||||||
netaddr
|
netaddr
|
||||||
lxml # for community.general.maven_artifact
|
lxml # for middleware_automation.common.maven_artifact
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
collections:
|
collections:
|
||||||
- name: middleware_automation.common
|
- name: middleware_automation.common
|
||||||
|
version: ">=1.2.1"
|
||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
- name: community.general # for `maven_artifact`
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ The roles depends on:
|
||||||
|
|
||||||
* [middleware_automation.common](https://github.com/ansible-middleware/common)
|
* [middleware_automation.common](https://github.com/ansible-middleware/common)
|
||||||
* [ansible-posix](https://docs.ansible.com/ansible/latest/collections/ansible/posix/index.html)
|
* [ansible-posix](https://docs.ansible.com/ansible/latest/collections/ansible/posix/index.html)
|
||||||
* [community.general](https://docs.ansible.com/ansible/latest/collections/community/general/index.html)
|
|
||||||
|
|
||||||
To install all the dependencies via galaxy:
|
To install all the dependencies via galaxy:
|
||||||
|
|
||||||
|
@ -180,9 +179,9 @@ Role Defaults
|
||||||
|
|
||||||
Providers support different sources:
|
Providers support different sources:
|
||||||
|
|
||||||
* `url`: http download for SPIs not requiring authentication
|
* `url`: http download for providers not requiring authentication
|
||||||
* `maven`: maven download for SPIs hosted publicly on Apache Maven Central or private Maven repositories like Github Maven requiring authentication
|
* `maven`: maven download for providers hosted publicly on Apache Maven Central or private Maven repositories like Github Maven requiring authentication
|
||||||
* `local_path`: static SPIs to be uploaded
|
* `local_path`: static providers to be uploaded
|
||||||
|
|
||||||
Provider definition:
|
Provider definition:
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
|
|
||||||
# this requires the `lxml` package to be installed; we redirect this step to localhost such that we do need to install it on the remote hosts
|
# this requires the `lxml` package to be installed; we redirect this step to localhost such that we do need to install it on the remote hosts
|
||||||
- name: "Download custom providers to localhost using maven"
|
- name: "Download custom providers to localhost using maven"
|
||||||
community.general.maven_artifact:
|
middleware_automation.common.maven_artifact:
|
||||||
repository_url: "{{ item.maven.repository_url }}"
|
repository_url: "{{ item.maven.repository_url }}"
|
||||||
group_id: "{{ item.maven.group_id }}"
|
group_id: "{{ item.maven.group_id }}"
|
||||||
artifact_id: "{{ item.maven.artifact_id }}"
|
artifact_id: "{{ item.maven.artifact_id }}"
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
no_log: "{{ item.maven.password is defined and item.maven.password | length > 0 | default(false) }}"
|
no_log: "{{ item.maven.password is defined and item.maven.password | length > 0 | default(false) }}"
|
||||||
notify: "{{ ['rebuild keycloak config', 'restart keycloak'] if not item.restart is defined or not item.restart else [] }}"
|
notify: "{{ ['rebuild keycloak config', 'restart keycloak'] if not item.restart is defined or not item.restart else [] }}"
|
||||||
|
|
||||||
- name: "Upload local maven SPIs"
|
- name: "Upload local maven providers"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ local_path.stat.path }}/{{ item.id }}.jar"
|
src: "{{ local_path.stat.path }}/{{ item.id }}.jar"
|
||||||
dest: "{{ keycloak.home }}/providers/{{ item.id }}.jar"
|
dest: "{{ keycloak.home }}/providers/{{ item.id }}.jar"
|
||||||
|
@ -256,7 +256,7 @@
|
||||||
when: item.maven is defined
|
when: item.maven is defined
|
||||||
no_log: "{{ item.maven.password is defined and item.maven.password | length > 0 | default(false) }}"
|
no_log: "{{ item.maven.password is defined and item.maven.password | length > 0 | default(false) }}"
|
||||||
|
|
||||||
- name: "Upload local SPIs"
|
- name: "Upload local providers"
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item.local_path}}"
|
src: "{{ item.local_path}}"
|
||||||
dest: "{{ keycloak.home }}/providers/{{ item.id }}.jar"
|
dest: "{{ keycloak.home }}/providers/{{ item.id }}.jar"
|
||||||
|
|
Loading…
Add table
Reference in a new issue