feat(role): Add fqdn string massaging functions

This commit is contained in:
hygienic-books 2025-04-10 00:56:50 +02:00
parent 61b158d880
commit 6880a2c1f7
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT
function reverse_fqdn() {
python3 -c 'import sys; arg_list = sys.argv[1].split("."); arg_list.reverse(); print(".".join(arg_list))' "${1}"
}

View File

@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT
function slash_fqdn() {
python3 -c 'import sys; arg_list = sys.argv[1].split("."); arg_list.reverse(); print("/".join(arg_list))' "${1}"
}