This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
forked from candlepin/rho
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move jboss find commands to separate playbook and make non-default
Two separate steps here: - Moving the JBoss find commands to their own playbook - Removing the scan facts from the default fact list This has the result that Rho will not run a scan unless specifically requested, and also the find commands are visibly separated from the rest.
- Loading branch information
Noah Lavine
committed
Oct 2, 2017
1 parent
7c6d37b
commit 1be5f16
Showing
4 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
- virt | ||
- virt_what | ||
- jboss | ||
- jboss-scan | ||
- brms | ||
- fuse | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
--- | ||
# Scan linux systems for JBoss EAP or Wildfly Installations | ||
- name: Gather jboss.jar-ver | ||
raw: FOUND=""; for jar in `find {{scan_dirs}} -xdev -name 'jboss-modules.jar' 2>/dev/null | grep -v '\.installation/patches'`; do VERSION=$(java -jar ${jar} -version 2> /dev/null | grep version | sed 's/.*version\s//g'); inode=$(stat -c '%i' "${jar}"); fs=$(df -T "${jar}" | grep "/dev" | sed 's/ .*//'); ctime=$(stat ${jar} | grep 'Change' | grep -oP '[1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]'); if [ ! -z "${VERSION}" ]; then if [ ! -z "$FOUND" ]; then FOUND="$FOUND; $VERSION**$ctime"; else FOUND=${VERSION}'**'${ctime}; fi; fi; done; echo ${FOUND} | ||
register: jboss.jar-ver | ||
ignore_errors: yes | ||
when: 'have_java and ("jboss.installed-versions" in facts_to_collect or "jboss.deploy-dates" in facts_to_collect)' | ||
|
||
- name: Gather jboss.run-jar-ver | ||
raw: FOUND=""; for jar in `find {{scan_dirs}} -xdev -name 'run.jar' 2>/dev/null`; do VERSION=$(java -jar ${jar} --version 2> /dev/null | grep build | sed 's/.*[CS]V[NS]Tag.//g' | sed 's/\sdate.*//g'); inode=$(stat -c '%i' "${jar}"); fs=$(df -T "${jar}" | tail -1 | sed 's/ .*//'); ctime=$(stat ${jar} | grep 'Change' | grep -oP '[1-2][0-9]{3}-[0-1][0-9]-[0-3][0-9]'); if [ ! -z "${VERSION}" ]; then if [ ! -z "$FOUND" ]; then FOUND="$FOUND; $VERSION**${ctime}"; else FOUND=${VERSION}'**'${ctime}; fi; fi; done; echo ${FOUND}; | ||
register: jboss.run-jar-ver | ||
ignore_errors: yes | ||
when: 'have_java and ("jboss.installed-versions" in facts_to_collect or "jboss.deploy-dates" in facts_to_collect)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters