Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ansible/geninv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ declare -A groups

while read type x hosts; do
readarray -d, -t ips < <(printf "${hosts}")

# Skip hosts that have an empty string
[[ "${hosts}" == "\"\"" ]] && continue

if [[ "${type}" == *-* ]]; then
groups[${type%%-*}]+=" ${type#*-} "
Expand Down
5 changes: 5 additions & 0 deletions ssh/genconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ EOF
while read type x hosts; do
[ -z "${hosts}" ] && continue

# Skip hosts that have an empty string
[[ "${hosts}" == "\"\"" ]] && continue
# Remove quotes from the hosts string
hosts=`echo $hosts | sed -s "s/^\(\(\"\(.*\)\"\)\|\('\(.*\)'\)\)\$/\\3\\5/g"`

readarray -d, -t ips < <(printf "${hosts}")

for i in "${!ips[@]}"; do
Expand Down