mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-14 14:26:04 +02:00
web-app-xwiki: admin bootstrap & REST/extension install fixes
• Guard admin tasks via XWIKI_SSO_ENABLED • Create admin using XWikiUsers object API • Wait for REST without DW redirect • Install OIDC/LDAP via /rest/jobs (+verify) • Mount xwiki.cfg/properties under Tomcat WEB-INF • Build REST URLs with url_join; enable DW auto bootstrap + repos https://chatgpt.com/share/68c42502-a5cc-800f-b05a-a1dbe48f014d
This commit is contained in:
@@ -24,15 +24,32 @@
|
||||
|
||||
- name: "Install LDAP and/or OIDC extensions"
|
||||
uri:
|
||||
url: "{{ XWIKI_REST_EXTENSION_INSTALL }}"
|
||||
url: "{{ XWIKI_REST_EXTENSION_INSTALL }}?jobType=install&async=false"
|
||||
method: PUT
|
||||
user: "{{ XWIKI_SUPERADMIN_USERNAME }}"
|
||||
password: "{{ XWIKI_SUPERADMIN_PASSWORD }}"
|
||||
force_basic_auth: yes
|
||||
headers: { Content-Type: "text/xml" }
|
||||
headers:
|
||||
Content-Type: "text/xml"
|
||||
Accept: "application/xml"
|
||||
X-Requested-With: "XMLHttpRequest"
|
||||
body: "{{ lookup('template', 'installjobrequest.xml.j2') }}"
|
||||
status_code: 200
|
||||
status_code: [200, 202]
|
||||
when:
|
||||
- (XWIKI_OIDC_ENABLED | bool and xwiki_oidc_ext.status == 404) or
|
||||
(XWIKI_LDAP_ENABLED | bool and (xwiki_ldap_ext is not skipped) and xwiki_ldap_ext.status == 404)
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
|
||||
|
||||
- name: "Verify OIDC extension is installed"
|
||||
when: XWIKI_OIDC_ENABLED | bool
|
||||
uri:
|
||||
url: "{{ XWIKI_REST_XWIKI }}/extensions/{{ XWIKI_EXT_OIDC_ID | urlencode }}"
|
||||
method: GET
|
||||
user: "{{ XWIKI_SUPERADMIN_USERNAME }}"
|
||||
password: "{{ XWIKI_SUPERADMIN_PASSWORD }}"
|
||||
force_basic_auth: yes
|
||||
status_code: 200
|
||||
register: _oidc_ok
|
||||
retries: 12
|
||||
delay: 5
|
||||
until: _oidc_ok is succeeded
|
||||
|
Reference in New Issue
Block a user