This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
# | |
# ============================================================================= | |
# | |
# This script is to be used with ansible-vault's --vault-id arg | |
# to retrieve the vault password via your OS's environment variable. | |
# | |
# This file *MUST* be saved with executable permissions. Otherwise, Ansible | |
# will try to parse as a password file and display: "ERROR! Decryption failed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -euo pipefail | |
DEV_GROUP="somegroup" | |
sudo groupadd --force "${DEV_GROUP}" | |
function adduser() { | |
local var_user="$1" | |
shift | |
local var_ssh_pub_key="$*" | |
id --user "${var_user}" &>/dev/null || sudo useradd --gid "${DEV_GROUP}" --groups wheel,docker "${var_user}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<-SCRIPT | |
sudo swapoff -a | |
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key --keyring /etc/apt/trusted.gpg.d/docker.gpg add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo add-apt-repository "deb [arch=amd64] https://apt.kubernetes.io/ kubernetes-xenial main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Full path to tc binary | |
TC=$(which tc) | |
# | |
# NETWORK CONFIGURATION | |
# interface - name of your interface device | |
# interface_speed - speed in mbit of your $interface | |
# ip - IP address of your server, change this if you don't want to use |