Skip to content

Commit

Permalink
Merge pull request #169 from yih-redhat/fix-qcow2
Browse files Browse the repository at this point in the history
ci: fix ansible check failure
  • Loading branch information
yih-redhat authored Nov 18, 2024
2 parents 07b01ea + 1511913 commit 7d5a5aa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/greenboot-bootc-qcow2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ check_result () {
greenprint "💚 Success"
else
greenprint "❌ Failed"
clean_up
exit 1
fi
}
Expand All @@ -84,7 +83,8 @@ wait_for_ssh_up () {
##
###########################################################
greenprint "Installing required packages"
sudo dnf install -y podman qemu-img firewalld qemu-kvm libvirt-client libvirt-daemon-kvm libvirt-daemon virt-install rpmdevtools
sudo dnf install -y podman qemu-img firewalld qemu-kvm libvirt-client libvirt-daemon-kvm libvirt-daemon virt-install rpmdevtools ansible-core
ansible-galaxy collection install community.general

# Start firewalld
greenprint "Start firewalld"
Expand Down Expand Up @@ -288,7 +288,7 @@ sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" ${EDGE_USER}@${GUEST_ADDRESS} "echo
sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" ${EDGE_USER}@${GUEST_ADDRESS} "echo ${EDGE_USER_PASSWORD} |nohup sudo -S systemctl reboot &>/dev/null & exit"

# Wait vm to finish the fallback
sleep 300
sleep 240

# Check for ssh ready to go.
greenprint "🛃 Checking for SSH is ready to go"
Expand Down Expand Up @@ -318,8 +318,7 @@ ansible_become_pass=${EDGE_USER_PASSWORD}
EOF

# Test greenboot functionality
podman run --annotation run.oci.keep_original_groups=1 -v "$(pwd)":/work:z -v "${TEMPDIR}":/tmp:z \
--rm quay.io/rhel-edge/ansible-runner:latest ansible-playbook -v -i /tmp/inventory greenboot-bootc.yaml || RESULTS=0
ansible-playbook -v -i /${TEMPDIR}/inventory greenboot-bootc.yaml || RESULTS=0

# Test result checking
check_result
Expand Down

0 comments on commit 7d5a5aa

Please sign in to comment.