Add reference to self

This commit is contained in:
Micke Nordin 2023-04-24 12:10:30 +02:00
parent 1ce82c89cc
commit c5e5279f0e
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -1,4 +1,5 @@
#!/bin/bash
me="$(hostname -s)"
cat /etc/hiera/data/common.yaml | yq -r '.multinode_mapping| to_entries |map({name: .key} + .value)| map(select(.server == "'"${me}"'")) |.[] |.name' |
grep -E "$(cat /etc/hiera/data/common.yaml | yq -r '.singlenodes[]' | sed -e 's/^- //' -e 's/$/|/' | tr -d '\n' | sed 's/|$//')"