View example.tf
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
### 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 |
View gist:5e22a249cbb78eeeee126473b728eaaa
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 | |
## | |
# 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 |
View gist:b9e63d871c3a711e153e
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/sh | |
# chkconfig: 2345 20 80 | |
# description: LXC Web Panel | |
### BEGIN INIT INFO | |
# Provides: | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: |
View check_redis.py
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 | |
""" | |
check_redis.py: Nagios plugin for checking a redis server. | |
Author: Steffen Zieger <me@saz.sh> | |
License: GPL | |
Version: 1.0 | |
""" |
View group_by_register
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
- 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} |
View nagios_nginx
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
server { | |
server_name localhost; | |
listen 80; | |
auth_basic "Restricted Area"; | |
auth_basic_user_file /etc/nagios3/htpasswd.users; | |
root /usr/share/nagios3/htdocs; | |
index index.php index.html; |
View gist:4085334
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
ps -A --sort -rss -o comm,pmem | head -n 11 |
View rewrite v1
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
location /v1/ { | |
rewrite /v1/(.+) /$1 permanent; | |
proxy_set_header Host $host; | |
proxy_set_header X-Request-URL $scheme://$http_host$request_uri; | |
proxy_pass http://public-api-backend; | |
} | |
location /v1/ { | |
proxy_set_header Host $host; |
View gist:3523338
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
$InputFileName /var/log/nginx/access.log | |
$InputFileTag nginx-acess: | |
$InputFileStateFile stat-nginx-access | |
$InputFileSeverity info | |
$InputRunFileMonitor |
View ansible-pull-test
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 -ex | |
# install needed packages for ansible | |
apt-get install -y -q python-paramiko python-yaml python-jinja2 python-simplejson | |
apt-get install -y -q git-core | |
# get ansible -- :) | |
git clone git://github.com/ansible/ansible.git | |
cd ./ansible |
NewerOlder