Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve generate-images & mass-update script and readme #1146

Merged
merged 4 commits into from
Jan 3, 2025
Merged

Conversation

Noki
Copy link
Member

@Noki Noki commented Dec 24, 2024

No description provided.

@Noki Noki marked this pull request as draft December 24, 2024 15:23
@Noki Noki force-pushed the improve-scripts branch 2 times, most recently from 4c492be to fb32311 Compare December 24, 2024 15:53
@Noki Noki changed the title Improve generate-images script and readme Improve generate-images & mass-update script and readme Dec 24, 2024
@Noki Noki marked this pull request as ready for review December 24, 2024 15:56
@Noki Noki force-pushed the improve-scripts branch 4 times, most recently from 5e6d394 to e800a06 Compare December 25, 2024 15:59
Noki added 4 commits January 3, 2025 02:13
- query locations and hosts with yq
- allow passing locations as comma separated list
- skip invalid locations
- add support for x86 images
- get role (corerouter, gateway, ap) from yml files instead of user "-core" from filename
- make availability support IPv4 and IPv6
mapfile -t locations < <(yq '.location' locations/*.yml | sed 's/\"//g' | sort)

# Extract valid hosts
mapfile -t hosts < <(yq '.hosts[] | select(.role == "corerouter" or .role == "gateway" or .role == "ap") | .hostname' locations/*.yml | sed 's/\"//g' | sort)
Copy link
Contributor

@pktpls pktpls Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use yq -r instead of the sed call: "-r output raw strings, not JSON texts"

@pktpls pktpls merged commit c37b788 into main Jan 3, 2025
13 checks passed
@pktpls pktpls deleted the improve-scripts branch January 3, 2025 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants