Skip to content
Snippets Groups Projects
Commit 9503434d authored by Justin's avatar Justin Committed by GitHub
Browse files

Fix IPS array variable expansion

$IPS only expands to the first ip address in the array:

justin@box:~$ declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5)
justin@box:~$ echo $IPS
10.10.1.3
justin@box:~$ echo ${IPS[@]}
10.10.1.3 10.10.1.4 10.10.1.5
parent c3c9e955
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ Example inventory generator usage: ...@@ -38,7 +38,7 @@ Example inventory generator usage:
``` ```
cp -r inventory my_inventory cp -r inventory my_inventory
declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5) declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5)
CONFIG_FILE=my_inventory/inventory.cfg python3 contrib/inventory_builder/inventory.py ${IPS} CONFIG_FILE=my_inventory/inventory.cfg python3 contrib/inventory_builder/inventory.py ${IPS[@]}
``` ```
Starting custom deployment Starting custom deployment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment