small wrapper script

autoautoinstall
Daniel Liu 1 year ago
parent 50146970e2
commit 36f63187f1
  1. 2
      libvirt/clean.yml
  2. 59
      mirror-vm
  3. 0
      qemu/run.yml

@ -1,2 +0,0 @@
---
- hosts: localhost

@ -0,0 +1,59 @@
#!/bin/sh
help() {
cat << EOF
=-=-=-=-= mirror-vm =-=-=-=-=
Usage: mirror-vm [COMMAND]
Commands:
libvirt-install, li
creates and installs the mirror server
on a new vm using libvirt
qemu-install, qi
creates and installs the mirror server
on a new vm using qemu
libvirt-run, lr
runs a previously created libvirt vm
qemu-run, qr
runs a previously created qemu vm
clean, c
removes user files like your vm
help, h
prints this message
EOF
}
libvirt_install() {
ansible-playbook -K libvirt/main.yml
}
qemu_install() {
ansible-playbook -K qemu/main.yml
}
libvirt_run() {
echo 'libvirt-run'
}
qemu_run() {
ansible-playbook -K qemu/run.yml
}
clean() {
rm -rf userdata
}
case $1 in
li|libvirt-install) libvirt_install;;
qi|qemu-install) qemu_install;;
lr|libvirt-run) libvirt_run;;
qr|qemu-run) qemu_run;;
c|clean) clean;;
h|help|*) help;;
esac
Loading…
Cancel
Save