File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ language: python
2
2
python : 2.7
3
3
4
4
install :
5
- - pip install tox
5
+ - pip install tox
6
6
7
7
script :
8
- - tox -e travis
8
+ - tox -e travis
9
9
Original file line number Diff line number Diff line change @@ -30,9 +30,11 @@ GREEN='\033[0;32m'
30
30
RED=' \033[0;31m'
31
31
# SGR code to set text color (foreground) to no color.
32
32
NC=' \033[0m'
33
+ # the logfile to hold the output of the playbook run
34
+ LOGFILE=" log/${box} _${VIRTUALENV_NAME} .log"
33
35
34
- echo " [INFO] $VIRTUALENV_NAME running idempotence test..."
35
- ansible-playbook -i ${INVENTORY} --limit ${box} ${PLAYBOOK} | \
36
+ echo " [INFO] ${ VIRTUALENV_NAME} running idempotence test..."
37
+ ansible-playbook -i ${INVENTORY} --limit ${box} ${PLAYBOOK} 2>&1 | tee ${LOGFILE} | \
36
38
grep " ${box} " | grep -q " ${PASS_CRITERIA} " && \
37
- echo -ne " [TEST] ${box} $VIRTUALENV_NAME idempotence : ${GREEN} PASS${NC} \n" || \
38
- (echo -ne " [TEST] ${box} $VIRTUALENV_NAME idempotence : ${RED} FAILED${NC} ${PASS_CRITERIA} \n" && exit 1)
39
+ echo -ne " [TEST] ${box} ${ VIRTUALENV_NAME} idempotence : ${GREEN} PASS${NC} \n" || \
40
+ (echo -ne " [TEST] ${box} ${ VIRTUALENV_NAME} idempotence : ${RED} FAILED${NC} ${PASS_CRITERIA} \n" && exit 1)
You can’t perform that action at this time.
0 commit comments