Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
resolve brms issue when eap_home_candidates is empty. Closes #496.
Browse files Browse the repository at this point in the history
  • Loading branch information
chambridge committed Nov 30, 2017
1 parent 1dc5f7f commit 437fc99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions roles/brms/tasks/main.yml
Expand Up @@ -16,13 +16,21 @@
when: 'have_locate and "jboss.brms" in facts_to_collect'

# Combine the above with any EAP_HOME directories we've found
- name: create list if eap_home_candidates is not empty
set_fact:
business_central_candidates_eap: "{{ [] }}"
kie_server_candidates_eap: "{{ [] }}"
when: '"jboss.brms" in facts_to_collect'

- name: create list if eap_home_candidates is not empty
set_fact:
business_central_candidates_eap: "{{ eap_home_candidates | zip_longest([], fillvalue='/standalone/deployments/business-central.war') | map('join') | list }}"
kie_server_candidates_eap: "{{ eap_home_candidates | zip_longest([], fillvalue='/standalone/deployments/kie-server.war') | map('join') | list }}"
when: 'eap_home_candidates is defined and "jboss.brms" in facts_to_collect'
- name: combine special directory candidates into single list
set_fact:
business_central_candidates: "{{ (jboss_brms_business_central_candidates.get('stdout_lines', []) +
(eap_home_candidates | map('format', '%s/standalone/deployments/business-central.war') | list)) | unique }}"
kie_server_candidates: "{{ (jboss_brms_kie_server_candidates.get('stdout_lines', []) +
(eap_home_candidates | map('format', '%s/standalone/deployments/kie-server.war') | list)) | unique }}"
business_central_candidates: "{{ jboss_brms_business_central_candidates.get('stdout_lines', []) + business_central_candidates_eap | unique }}"
kie_server_candidates: "{{ jboss_brms_kie_server_candidates.get('stdout_lines', []) + kie_server_candidates_eap | unique }}"
when: '"jboss.brms" in facts_to_collect'

- name: cat MANIFEST.MF files
Expand Down
2 changes: 1 addition & 1 deletion roles/jboss_eap/tasks/main.yml
Expand Up @@ -9,7 +9,7 @@
when: 'have_java and ("jboss.eap.running-paths" in facts_to_collect or "jboss.eap.eap-home" in facts_to_collect or "jboss.fuse.fuse-on-eap" in facts_to_collect)'

- name: use locate to look for jboss-modules.jar
raw: locate jboss-modules.jar | xargs -n 1 dirname
raw: locate jboss-modules.jar | xargs -n 1 dirname 2> /dev/null
register: jboss_eap_locate_jboss_modules_jar
ignore_errors: yes
when: 'have_locate and ("jboss.eap.locate-jboss-modules-jar" in facts_to_collect or "jboss.eap.eap-home" in facts_to_collect or "jboss.fuse.fuse-on-eap" in facts_to_collect)'
Expand Down

0 comments on commit 437fc99

Please sign in to comment.