feat: added helpful scripts

This commit is contained in:
ITQ
2025-08-14 20:05:14 +03:00
parent 8c6441e13c
commit 937d491f20
2 changed files with 26 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
echo "Pulling kubespray image..."
docker pull quay.io/kubespray/kubespray:v2.27.1 -q
echo "Pulled"
CONTAINER_ID=`docker run --rm --mount type=bind,source="$(pwd)"/kubespray,dst=/inventory \
--mount type=bind,source="$(pwd)"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
--network host \
--detach \
quay.io/kubespray/kubespray:v2.27.1 \
sleep infinity`
docker exec -i $CONTAINER_ID \
sed -i '/no_log: "{{ not (unsafe_show_logs | bool) }}"/s@^@#@' \
roles/download/tasks/download_file.yml
docker exec -i $CONTAINER_ID \
ls -l
docker exec -i $CONTAINER_ID \
bash -c " \
ANSIBLE_LOAD_CALLBACK_PLUGINS=False \
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml -u ubuntu -b -v"
docker rm --force $CONTAINER_ID
View File