This Document describes the Requierements on the WarpServer given by the AlbianWarp Client
The Server should provide a JSON based API with Endpoints for Every Ressource the Server has to handle.
These Resources are:
[defaults] | |
# ___________________________ | |
# < Stop the mad Cow disease! > | |
# --------------------------- | |
# \ ^__^ | |
# \ (oo)\_______ | |
# (__)\ )\/\ | |
# ||----w | | |
# || || |
--- | |
- hosts: all | |
tasks: | |
- name: Creates daily Freshclam Cronjob | |
cron: special_time="daily" | |
name="Run Freshclam daily" | |
cron_file="freshclam.sh" | |
user="root" | |
job="/usr/bin/freshclam --quiet" |
#!/bin/bash | |
# | |
# Ham5ter's personal .bash_profile file | |
# | |
# Author: ham5ter@ham5ter.de | |
# | |
### helper functions ### | |
helpers() { |
#!/bin/bash | |
# | |
# Very simple Script that checks a configured DNS Record, | |
# If it changed since the Last time this script was run, | |
# it alerts a specified Mail Recipient | |
# http://tecadmin.net/ways-to-send-email-from-linux-command-line/ | |
# | |
# Config Stuff | |
DOMAIN="example.com" |
#!/bin/bash | |
# | |
# This Script sets a random root password, disables the root user and deletes itself afterwards! | |
# Put this Script in the "/etc/rc5.d/" directory. | |
# | |
# Version: 1.0 | |
# Author: ham5ter@ham5ter.de | |
# Date 02.08.2016 | |
genpasswd() { |
#/bin/bash | |
# | |
# This script is used to Create a User Account with SUDO Privileges!!!, | |
# Display the Password and force the User to change that Password upon the first Login! | |
# | |
# Version: 1.0 | |
# Author: ham5ter@ham5ter.de | |
# Date: 02.08.2016 | |
#!/bin/bash | |
# Zero out all the remaining Space of a Virtual Machines Filesystem for Image Creation | |
dd if=/dev/zero of=/EMPTY bs=1M | |
sync | |
rm -f /EMPTY |
# Clean up Package Management | |
apt-get -y remove linux-headers-$(uname -r) build-essential | |
apt-get -y autoremove | |
apt-get -y clean | |
# Removing DHCP leases | |
echo "cleaning up dhcp leases" | |
rm /var/lib/dhcp/* | |
# Make sure Udev doesn't block our network |
#!/bin/bash | |
apt-get update | |
apt-get install wget -y | |
wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add - | |
echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list | |
apt-get update | |
apt-get install salt-minion -y | |
cat << EOF > /etc/salt/minion | |
master: $1 | |
EOF |