Skip to content

Instantly share code, notes, and snippets.

View cdahlhausen's full-sized avatar

Christian Dahlhausen cdahlhausen

View GitHub Profile
@cdahlhausen
cdahlhausen / pedantically_commented_playbook.yml
Created September 22, 2017 15:30 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@cdahlhausen
cdahlhausen / ebs_autoscale.sh
Created September 7, 2017 15:16 — forked from DanielMuller/ebs_autoscale.sh
Allow autoscaling EBS volumes based on disk usage
#!/bin/bash
# Allows to attach and remove EBS volumes managed under LVM to
# have a dynamically sized partition attached to an EC2 instance
#
# Intance needs either to be launched with a role able to access to relevant AWS API endpoints
# or the credentials can be hardcoded in the config.
#
# Minimal IAM Role:
# {
@cdahlhausen
cdahlhausen / grafana custom.ini
Created June 27, 2017 21:27 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@cdahlhausen
cdahlhausen / grafana custom.ini
Created June 27, 2017 21:27 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@cdahlhausen
cdahlhausen / init_ansible_role.sh
Created November 3, 2015 20:43 — forked from zircote/init_ansible_role.sh
bash function to create a boilerplate ansible role (I am lazy)
#!/bin/sh
function init_ansible_role {
if [[ ! -n $1 ]]; then
echo no init
return
fi
mkdir -p roles/${1}/{defaults,tasks,files,templates,vars,handlers,meta}
for i in defaults tasks vars handlers meta; do
if [[ ! -f roles/${1}/${i}/main.yaml ]]; then
echo creating file: roles/${1}/${i}/main.yaml