Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ansiblebit/primogen
Browse files Browse the repository at this point in the history
  • Loading branch information
steenzout committed May 5, 2015
2 parents b3ee0cf + ec05bdc commit d9c8123
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Vagrant.configure('2') do |config|
end
end
end
end

# puts "[DEBUG] provisioning #{box_name} using ansible vagrant playbook..."
config.vm.provision 'ansible' do |ansible|
ansible.playbook = PLAYBOOK
ansible.verbose = 'v'
end

# puts "[DEBUG] provision using ansible vagrant playbook..."
config.vm.provision 'ansible' do |ansible|
ansible.playbook = PLAYBOOK
ansible.verbose = 'v'
end
end
4 changes: 3 additions & 1 deletion tests/test_idempotence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,12 @@ LOGFILE="log/${BOX}_${VIRTUALENV_NAME}.log"
EXTRA_ARGS=''
if [ $BOX == "localhost" ]; then
EXTRA_ARGS="--connection=local --extra-vars idempotence=yes"
else
EXTRA_ARGS="--u vagrant"
fi

echo "[INFO] ${BOX} ${VIRTUALENV_NAME} running idempotence test..."
ansible-playbook -i ${INVENTORY} --limit ${BOX} ${PLAYBOOK} ${EXTRA_ARGS} 2>&1 | tee ${LOGFILE} | \
ansible-playbook -i ${INVENTORY} --limit ${BOX}, ${PLAYBOOK} ${EXTRA_ARGS} 2>&1 | tee ${LOGFILE} | \
grep "${BOX}" | grep -q "${PASS_CRITERIA}" && \
echo -ne "[TEST] ${BOX} ${VIRTUALENV_NAME} idempotence : ${GREEN}PASS${NC}\n" || \
(echo -ne "[TEST] ${BOX} ${VIRTUALENV_NAME} idempotence : ${RED}FAILED${NC} ${PASS_CRITERIA}\n" && exit 1)

0 comments on commit d9c8123

Please sign in to comment.