4 #Generate MD formatted tags from roles and cluster yaml files
5 printf "|%25s |%9s\n" "Tag name" "Used for"
6 echo "|--------------------------|---------"
7 tags=$(grep -r tags: . | perl -ne '/tags:\s\[?(([\w\-_]+,?\s?)+)/ && printf "%s ", "$1"'|\
8 perl -ne 'print join "\n", split /\s|,/' | sort -u)
10 match=$(cat docs/ansible.md | perl -ne "/^\|\s+${tag}\s\|\s+((\S+\s?)+)/ && printf \$1")
11 printf "|%25s |%s\n" "${tag}" " ${match}"