mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-09-15 08:33:20 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1d2701d19 | |||
| 604eb7a6e6 | |||
| ddf01c3a74 | |||
| a204ed5169 | |||
| c697ff36aa | |||
| b6608ca3e4 | |||
| 3ee9a71a4f | |||
| 8252a45dfd | |||
| 7794d70f2b | |||
| c99f098c2e | |||
| 60815cf435 | |||
| 7867b87d85 | |||
| 4511ea8558 | |||
| dfe19f3731 |
@@ -9,12 +9,17 @@ set -euo pipefail
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
PROVIDER=virtualbox
|
||||
|
||||
# Read all boxes for all platforms from the "molecule.yml" files
|
||||
all_boxes=$(cat "${GIT_ROOT}"/molecule/*/molecule.yml |
|
||||
yq -r '.platforms[].box' | # Read the "box" property of each node under "platforms"
|
||||
grep --invert-match --regexp=--- | # Filter out file separators
|
||||
sort |
|
||||
uniq)
|
||||
yq --version
|
||||
|
||||
# Define the path to the molecule.yml files
|
||||
MOLECULE_YML_PATH="${GIT_ROOT}/molecule/*/molecule.yml"
|
||||
|
||||
# Extract and sort unique boxes from all molecule.yml files
|
||||
all_boxes=$(for file in $MOLECULE_YML_PATH; do
|
||||
yq eval '.platforms[].box' "$file"
|
||||
done | sort -u)
|
||||
|
||||
echo all_boxes: "$all_boxes"
|
||||
|
||||
# Read the boxes that are currently present on the system (for the current provider)
|
||||
present_boxes=$(
|
||||
|
||||
Reference in New Issue
Block a user