Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tests_tooling11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/tests_tooling b/include/tests_tooling
index 26eee608..64debcde 100644
--- a/include/tests_tooling
+++ b/include/tests_tooling
@@ -54,10 +54,13 @@
# Ansible
FOUND=0
- LIST="~/.ansible ~/.ansible-retry ${ROOTDIR}etc/ansible ${ROOTDIR}root/.ansible ${ROOTDIR}tmp/.ansible"
- for ITEM in ${LIST}; do if DirectoryExists ${ITEM}; then FOUND=1; fi; done
- LIST="${ROOTDIR}var/log/ansible.log"
- for ITEM in ${LIST}; do if FileExists ${ITEM}; then FOUND=1; fi; done
+ LIST="~/.ansible ${ROOTDIR}etc/ansible ${ROOTDIR}root/.ansible ${ROOTDIR}tmp/.ansible"
+ for ITEM in ${LIST}; do if DirectoryExists ${ITEM}; then FOUND=1; break; fi; done
+ # Test for files (only if no match was found)
+ if [ ${FOUND} -eq 0 ]; then
+ LIST="${ROOTDIR}var/log/ansible.log ~/.ansible-retry"
+ for ITEM in ${LIST}; do if FileExists ${ITEM}; then FOUND=1; break; fi; done
+ fi
if [ ${FOUND} -eq 1 ]; then
LogText "Result: found a possible trace of Ansible"