diff --git a/templates/multinode/get_paying_customers.erb.sh b/templates/multinode/get_paying_customers.erb.sh index 2ec2ace..e1458b1 100644 --- a/templates/multinode/get_paying_customers.erb.sh +++ b/templates/multinode/get_paying_customers.erb.sh @@ -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/|$//')"