back to bash
This commit is contained in:
@@ -19,28 +19,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Gitea repository
|
- name: executing remote ssh commands using password
|
||||||
uses: gitea/checkout@v3
|
uses: appleboy/ssh-action@v1.2.0
|
||||||
|
with:
|
||||||
- name: List files for debugging
|
host: 192.168.11.102
|
||||||
run: ls -l ./scripts
|
username: root
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
- name: upload script to Proxmox
|
port: 22
|
||||||
uses: appleboy/scp-action@master
|
script: |
|
||||||
with:
|
pveversion
|
||||||
host: 192.168.11.102
|
|
||||||
username: root
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: 22
|
|
||||||
source: './scripts/create_cloud_VM_140.sh'
|
|
||||||
target: '/root/scripts/'
|
|
||||||
|
|
||||||
- name: executing remote bash script
|
|
||||||
uses: appleboy/ssh-action@v1.2.0
|
|
||||||
with:
|
|
||||||
host: 192.168.11.102
|
|
||||||
username: root
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: 22
|
|
||||||
script: |
|
|
||||||
bash /root/scripts/create_cloud_VM_140.sh
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
VMID=140
|
|
||||||
VMNAME="cloudINIT140"
|
|
||||||
MEMORY=2048
|
|
||||||
NET="virtio,bridge=vmbr0"
|
|
||||||
CORES=2
|
|
||||||
SOCKETS=1
|
|
||||||
OSTYPE="l26"
|
|
||||||
DISKPATH="/mnt/storage_sdb/template/iso/noble-server-cloudimg-amd64.img"
|
|
||||||
DISKSTORAGE="smallDisk"
|
|
||||||
CLOUDDISK="${DISKSTORAGE}:140/vm-140-disk-0.raw"
|
|
||||||
CLOUDINIT="${DISKSTORAGE}:cloudinit"
|
|
||||||
BOOT="order=virtio0"
|
|
||||||
IPCONFIG="ip=192.168.11.240/24,gw=192.168.11.1"
|
|
||||||
CIUSER="chs"
|
|
||||||
CIPASSWORD="genius"
|
|
||||||
SSHPUBKEY='ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAE39D/Dep3EHMWXB6wiMTL0My1SlMZVk0Y80jEv7LOb xchose@freya.local'
|
|
||||||
|
|
||||||
qm create $VMID --name $VMNAME --memory $MEMORY --net0 $NET --cores $CORES --sockets $SOCKETS --ostype $OSTYPE
|
|
||||||
qm set $VMID --bios seabios
|
|
||||||
qm importdisk $VMID $DISKPATH $DISKSTORAGE
|
|
||||||
qm set $VMID --virtio0 $CLOUDDISK
|
|
||||||
qm set $VMID --ide2 $CLOUDINIT
|
|
||||||
qm set $VMID --boot $BOOT
|
|
||||||
qm set $VMID --ipconfig0 $IPCONFIG
|
|
||||||
qm set $VMID --ciuser $CIUSER --cipassword $CIPASSWORD
|
|
||||||
qm set $VMID --sshkey <(echo "$SSHPUBKEY")
|
|
||||||
qm start $VMID
|
|
||||||
qm resize $VMID virtio0 +30G
|
|
||||||
Reference in New Issue
Block a user