Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

disafronov/ubuntu-vm-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

ubuntu-vm-config

Preconfigure a Ubuntu KVM VM from minimal installation for ansible management

Example usage

#!/bin/bash

export ACCOUNT_EMERGENCY='ssh-rsa YourRootSshPublicKey Emergency account'
export ACCOUNT_MAINTENANCE='ssh-rsa YourAnsibleSshPublicKey Maintenance account'

export ROOTMAIL=your@root.email
export MONITORING_SERVER=your.monitoring.server

###

if [[ -n "$(hostname -d)" && -n "${ACCOUNT_EMERGENCY}" && -n "${ACCOUNT_MAINTENANCE}" && -n "${ROOTMAIL}" && -n "${MONITORING_SERVER}" ]]; then
	wget https://github.com/DmitriySafronov/ubuntu-vm-config/raw/master/install.sh -O ~/ubuntu-vm-config-install.sh
	source ~/ubuntu-vm-config-install.sh
	rm -f ~/ubuntu-vm-config-install.sh 2> /dev/null
	rm -f ~/.wget-hsts 2> /dev/null
	cat /dev/null > ~/.bash_history && history -c
	cat /dev/null > /root/.bash_history && echo "" > /etc/machine-id && sync && poweroff
else
	clear; echo "Set up script first!"
fi

About

Preconfigure a Ubuntu KVM VM from minimal installation

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages