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 12
12
# - PLAYBOOK : the path to the Ansible playbook.
13
13
#
14
14
# from <playbook_name>.sh
15
- # - box : the name of the vagrant box
15
+ # - BOX : the name of the vagrant box
16
16
#
17
17
# optional variables:
18
18
#
@@ -31,10 +31,10 @@ RED='\033[0;31m'
31
31
# SGR code to set text color (foreground) to no color.
32
32
NC=' \033[0m'
33
33
# the logfile to hold the output of the playbook run
34
- LOGFILE=" log/${box } _${VIRTUALENV_NAME} .log"
34
+ LOGFILE=" log/${BOX } _${VIRTUALENV_NAME} .log"
35
35
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
80
80
# force Ansible to ask for sudo password when running tests against Vagrant
81
81
export ANSIBLE_ASK_SUDO_PASS=True
82
82
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' `
84
84
do
85
85
86
86
echo " [INFO] preparing ${box} ..."
87
- vagrant up ${box } 2> /dev/null
87
+ vagrant up ${BOX } 2> /dev/null
88
88
if [ $? -ne 0 ]; then
89
89
# box not enabled
90
90
continue
91
91
fi
92
92
93
93
. test_idempotence.sh
94
94
95
- echo " [INFO] destroying ${box } ..."
96
- vagrant destroy -f $box
95
+ echo " [INFO] destroying ${BOX } ..."
96
+ vagrant destroy -f ${BOX}
97
97
done
You can’t perform that action at this time.
0 commit comments