mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 09:27:38 -02:30
Switch to dynamic ansible inventory
We don't need to install and use kargo cli anymore.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
INVENTORY="/root/kargo/inventory/inventory.cfg"
|
||||
INVENTORY="nodes_to_inv.py"
|
||||
|
||||
nodes=""
|
||||
i=1
|
||||
@@ -9,13 +9,6 @@ for nodeip in `cat nodes` ; do
|
||||
nodes+=" node${i}[ansible_ssh_host=${nodeip},ip=${nodeip}]"
|
||||
done
|
||||
|
||||
if [ -f "$INVENTORY" ] ; then
|
||||
echo "$INVENTORY already exists, if you want to recreate, pls remove it and re-run this script"
|
||||
else
|
||||
echo "Preparing inventory..."
|
||||
kargo prepare -y --nodes $nodes
|
||||
fi
|
||||
|
||||
echo "Running deployment..."
|
||||
#kargo deploy -y --ansible-opts="-e @custom.yaml"
|
||||
ansible-playbook -i $INVENTORY /root/kargo/cluster.yml -e @custom.yaml
|
||||
|
||||
Reference in New Issue
Block a user