File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1212# - PLAYBOOK : the path to the Ansible playbook.
1313#
1414# from <playbook_name>.sh
15- # - box : the name of the vagrant box
15+ # - BOX : the name of the vagrant box
1616#
1717# optional variables:
1818#
@@ -31,10 +31,10 @@ RED='\033[0;31m'
3131# SGR code to set text color (foreground) to no color.
3232NC=' \033[0m'
3333# the logfile to hold the output of the playbook run
34- LOGFILE=" log/${box } _${VIRTUALENV_NAME} .log"
34+ LOGFILE=" log/${BOX } _${VIRTUALENV_NAME} .log"
3535
36- echo " [INFO] ${VIRTUALENV_NAME} running idempotence test..."
37- ansible-playbook -i ${INVENTORY} --limit ${box } ${PLAYBOOK} 2>&1 | tee ${LOGFILE} | \
38- grep " ${box } " | grep -q " ${PASS_CRITERIA} " && \
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)
36+ echo " [INFO] #{BOX} ${VIRTUALENV_NAME} running idempotence test..."
37+ ansible-playbook -i ${INVENTORY} --limit ${BOX } ${PLAYBOOK} 2>&1 | tee ${LOGFILE} | \
38+ grep " ${BOX } " | grep -q " ${PASS_CRITERIA} " && \
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)
Original file line number Diff line number Diff line change @@ -80,18 +80,18 @@ source ${VIRTUALENV}/bin/activate
8080# force Ansible to ask for sudo password when running tests against Vagrant
8181export ANSIBLE_ASK_SUDO_PASS=True
8282
83- for box in ` grep vagrant.dev group_vars/all.yml | sed ' s/://g' `
83+ for BOX in ` grep vagrant.dev group_vars/all.yml | sed ' s/://g' `
8484do
8585
8686 echo " [INFO] preparing ${box} ..."
87- vagrant up ${box } 2> /dev/null
87+ vagrant up ${BOX } 2> /dev/null
8888 if [ $? -ne 0 ]; then
8989 # box not enabled
9090 continue
9191 fi
9292
9393 . test_idempotence.sh
9494
95- echo " [INFO] destroying ${box } ..."
96- vagrant destroy -f $box
95+ echo " [INFO] destroying ${BOX } ..."
96+ vagrant destroy -f ${BOX}
9797done
You can’t perform that action at this time.
0 commit comments