Skip to content

Instantly share code, notes, and snippets.

@giovtorres
giovtorres / virt-install-centos
Last active March 15, 2023 09:57
Install CentOS cloud images on KVM using cloud-init
#!/bin/bash
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.**
## **This updated version has more options and less hardcoded variables.**
# Take one argument from the commandline: VM name
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
@giovtorres
giovtorres / bootstrap-role-vagrant.sh
Created September 20, 2017 12:08
Bootstrap files for a new ansible role after running `ansible-galaxy init` (Vagrant)
#/bin/bash
# Bootstrap files for a new ansible role after running `ansible-galaxy init`
echo "[+] Checking for .gitignore..."
if [ ! -f ".gitignore" ]; then
echo "[+] Not found. Creating .gitignore..."
cat > .gitignore << _EOF_
__pycache__
*.pyc