Skip to content

Commit

Permalink
tests: fix installing pkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jan 27, 2025
1 parent 8e13bab commit eb29698
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions t/scenarios/_common/ansible/roles/yum_apt_retry/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
- name: "package yum/apt retry installer: {{ package | join(' ') }} {{ rpm | join(' ') }} {{ deb | join(' ') }}"
shell: |
set -x
allfound=1
for file in {{ creates | join(' ') }}; do
if ! test -e $file; then
allfound=0
if [ "{{ creates | join(' ') }}" != "" ]; then
allfound=1
for file in {{ creates | join(' ') }}; do
if ! test -e $file; then
allfound=0
fi
done
if [ $allfound -eq 1 ]; then
exit 0
fi
done
if [ $allfound -eq 1 ]; then
exit 0
fi
if test -f /usr/bin/apt; then
apt-get install -y {{ package | join(' ') }} {{ deb | join(' ') }}
Expand Down

0 comments on commit eb29698

Please sign in to comment.