mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 05:45:06 +03:00
Add tags
Add tags to allow more granular tasks filtering. Add generator script for MD formatted tags found. Add docs for tags how-to. Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
10
scripts/gen_tags.sh
Normal file
10
scripts/gen_tags.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh -eo pipefail
|
||||
#Generate MD formatted tags from roles and cluster yaml files
|
||||
printf "|%25s |%9s\n" "Tag name" "Used for"
|
||||
echo "|--------------------------|---------"
|
||||
tags=$(grep -r tags: . | perl -ne '/tags:\s\[?(([\w\-_]+,?\s?)+)/ && printf "%s ", "$1"'|\
|
||||
perl -ne 'print join "\n", split /\s|,/' | sort -u)
|
||||
for tag in $tags; do
|
||||
match=$(cat docs/ansible.md | perl -ne "/^\|\s+${tag}\s\|\s+((\S+\s?)+)/ && printf \$1")
|
||||
printf "|%25s |%s\n" "${tag}" " ${match}"
|
||||
done
|
||||
Reference in New Issue
Block a user