Skip to content

Instantly share code, notes, and snippets.

@ngelik
ngelik / ansible.cfg
Created June 25, 2018 12:04 — forked from krigar/ansible.cfg
Bastion Playbook
[ssh_connection]
ssh_args = -F ssh.cfg
control_path = ~/.ssh/mux-%r@%h:%p
@ngelik
ngelik / README.md
Created May 17, 2018 12:51 — forked from magnetikonline/README.md
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
@ngelik
ngelik / haproxy.cfg
Last active August 29, 2015 14:06 — forked from dakatsuka/haproxy.cfg
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
listen rabbitmq 0.0.0.0:5672
mode tcp
@ngelik
ngelik / .bash_profile
Last active August 29, 2015 14:06 — forked from duksis/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
@ngelik
ngelik / monitrc
Last active August 29, 2015 14:06 — forked from technopagan/monitrc
###############################################################################
## Basic Configuration
###############################################################################
# Start Monit as background daemon and delay 1st check (in seconds) after boot
set daemon 60
with start delay 120
# Mail configuration
@ngelik
ngelik / testrsync.yml
Last active August 29, 2015 14:06 — forked from tima/testrsync.yml
---
-
hosts: remote_host
gather_facts: no
name: "Testing synchronize"
vars:
start_time: "{{ lookup('pipe','date') }}"
test_files:
- test1
- test2
# This playbook installs and configure corosync and pacemaker on a set of nodes part of a given group.
---
# See the file /etc/ansible/hosts where the group is actually defined. There might be a way to define groups in a file 'closer' to this playbook.
- hosts: clusternodes
vars:
mcastport : 5405
tasks:
# It would be better to use Ansible to change the IP tables config to allow corosync/pacemaker on the nodes part of the cluster.
# system update
yum update
yum groupinstall "Development Tools"
yum install libyaml libyaml-devel readline-devel ncurses-devel gdbm-devel tcl-devel openssl-devel db4-devel libffi-devel
# ruby
version=2.0.0-p451
wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz -P rpmbuild/SOURCES
wget https://raw.github.com/hansode/ruby-2.0.0-rpm/master/ruby200.spec -P rpmbuild/SPECS
rpmbuild -bb rpmbuild/SPECS/ruby200.spec