Skip to content

Commit

Permalink
fixup! tests: Dip our toes into using Ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Mar 9, 2018
1 parent f1eceed commit 4b2d68f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions .papr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ extra-repos:
tests:
# we're still on devmapper here; we need to expand rootfs for tests
- for vm in vmcheck{1..3}; do ssh $vm lvresize -r -L +5G atomicos/root; done
- ci/vmcheck-provision.sh
- yum install -y epel-release
- ci/build-check.sh
- make vmcheck
Expand Down
15 changes: 9 additions & 6 deletions tests/common/libvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ vm_setup() {
export SSH="ssh $sshopts $VM"
export SCP="scp $sshopts"

cat >${topsrcdir}/ansible-inventory.yml <<EOF
all:
hosts:
${VM}:
ansible_ssh_common_args: "${sshopts}"
EOF
local HOSTS="${HOSTS:-${VM}}"
inventory=${topsrcdir}/ansible-inventory.ini
(echo '[vmcheck]' &&
for host in "${HOSTS}"; do
echo "${host}"
done &&
echo '[vmcheck:vars]' &&
echo 'ansible_ssh_common_args: "'${sshopts}'"'
) > ${inventory}.new && mv ${inventory}{.new,}
}

vm_ansible_inline() {
Expand Down

0 comments on commit 4b2d68f

Please sign in to comment.