I hereby claim:
- I am thiagoalmeidasa on github.
- I am thiagoalmeida (https://keybase.io/thiagoalmeida) on keybase.
- I have a public key ASAdhr_KkmzR2t2uyT6YAzNU-3lobvZH8xCMuCSncbe5mQo
To claim this, I am signing this object:
for CONTAINER in `dockps "NAMES"`; do docker run --rm --volumes-from $CONTAINER -e CONTAINER -v $(pwd):/backup busybox tar cjvf /backup/$CONTAINER-`date +%Y%m%d_%H%M%S`.tar.bz2 `docker inspect --format='{{range $p, $conf := .Config.Volumes}} {{$p}} {{end}}' $CONTAINER`;done |
# Problem: | |
# | |
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each. | |
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file. | |
# This means your ansible playbook will hang in this case. | |
# | |
# You can however use the ansible git module to checkout your repo in multiple steps, like this: | |
# | |
- hosts: webserver | |
vars: |
{ | |
"interface": "0.0.0.0:4984", | |
"adminInterface": "0.0.0.0:4985", | |
"log":[ | |
"REST", | |
"Shadow", | |
"CRUD", | |
"CRUD+", | |
"HTTP", | |
"HTTP+", |
I hereby claim:
To claim this, I am signing this object:
# Create a durable, direct exchange called "syslog" from RabbitMQ UI | |
$ rabbitmqctl add_vhost syslog | |
$ rabbitmqctl set_permissions -p syslog enyo ".*" ".*" ".*" | |
# /etc/syslog-ng/syslog-ng.conf | |
``` | |
log { source(src); destination(d_rabbit); }; | |
destination d_rabbit { |
--- | |
- hosts: all | |
gather_facts: no | |
vars: | |
string: "string" | |
list: | |
- item1 | |
- item2 | |
dict: | |
key1: value1 |
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
redis-cli keys \* | while read key; do value="`redis-cli get "$key"`"; echo "$key: $value"; done |
{ | |
"Version": "2012-10-17", | |
"Statement": [{ | |
"Sid": "AllowEC2CreationWithTagLimit", | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:RunInstances" | |
], | |
"Resource": "arn:aws:ec2:eu-central-1:111122223333:instance/*", | |
"Condition": { |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
### A simple helper script for using ansible and vagrant together. | |
# Usually you don't need an inventory file for vagrant, since one is created | |
# automatically. But if you want to give your vagrant host a special group | |
# or assign some variables, this script becomes handy. | |
# | |
# Use it like this: | |
# 1) create a file e.g ansible/inventories/vagrant.py and paste the content of this gist |