Skip to content

Instantly share code, notes, and snippets.

@cocoy
cocoy / group_by_register
Created December 5, 2012 09:00
ansible group_by example using register
- hosts: all
tasks:
#- name: Create a group of all hosts by operating system
# action: group_by key=${ansible_distribution}-${ansible_distribution_version}
#- name: Create a group of all hosts by operating system
# action: group_by key=${ansible_distribution}-${ansible_distribution_version}
@cocoy
cocoy / check_redis.py
Created January 30, 2013 09:18
Modified a bit.
#!/usr/bin/env python
"""
check_redis.py: Nagios plugin for checking a redis server.
Author: Steffen Zieger <[email protected]>
License: GPL
Version: 1.0
"""
@cocoy
cocoy / gist:b9e63d871c3a711e153e
Created April 8, 2015 14:04
lxc web panel centos init script
#!/bin/sh
# chkconfig: 2345 20 80
# description: LXC Web Panel
### BEGIN INIT INFO
# Provides:
# Required-Start:
# Required-Stop:
# Should-Start:
#!/bin/bash
##
# Compiling terraform-provisioner-ansible for Terraform 0.7.13 for Ubuntu Trusty
#
# $ mkdir terraform-trusty64
# $ cd terraform-trusty64/
# $ vagrant init ubuntu/trusty64
# $ vagrant up
# $ vagrant ssh
@cocoy
cocoy / example.tf
Last active February 14, 2018 10:53
### NOTE:
### You need to input your ACCESS_KEY, SECRET_KEY, KEYPAIR_NAME, VPC_ID
###
provider "aws" {
access_key = "YOUR_ACCESS_KEY"
secret_key = "YOUR_SECRET_KEY"
region = "us-west-2"
}
## Instance Declaration