Contents
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
Logstash Configuration... | |
input { | |
file { | |
format => "plain" | |
path => "/var/log/apache2/*error.log" | |
type => "apacheerror" | |
} | |
} | |
filter { |
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
[a] | |
{% for a in a_provision.instances %} | |
{{ a.rax_accessipv4 }} | |
{% endfor %} | |
[b] | |
{% for b in b_provision.instances %} | |
{{ b.rax_accessipv4 }} | |
{% endfor %} |
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
--- | |
# This has been tested with ansible 1.3 with these commands: | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
# NB: The type of the variable is crucial! | |
- name: Ansible Conditionals Examples | |
hosts: $hosts | |
vars_files: |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
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 | |
# Configure the instance to run as a Port Address Translator (PAT) to provide | |
# Internet connectivity to private instances. | |
function log { logger -t "vpc" -- $1; } | |
function die { | |
[ -n "$1" ] && log "$1" | |
log "Configuration of PAT failed!" | |
exit 1 |
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
echo "ttyS0" >> /etc/securetty | |
vi /etc/default/grub | |
# Add console=ttyS0 to the end of kernel line(s) "GRUB_CMDLINE_LINUX" | |
grub2-mkconfig -o /boot/grub2/grub.cfg | |
reboot | |
#vi /etc/sysconfig/init | |
# Edit ACTIVE_CONSOLES to look like: | |
#ACTIVE_CONSOLES="/dev/tty[1-6] /dev/ttyS0" |
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 | |
# Interpret whether the input needs to go to ansible, or ansible-playbook and run appropriately | |
# First update the git repos for each project | |
/usr/bin/update-git-repos | |
export ANSIBLE_FORCE_COLOR=1 | |
export ANSIBLE_RETRY_FILES_ENABLED=False |
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 -x | |
setenforce 0 | |
curl http://download.gluster.org/pub/gluster/glusterfs/LATEST/Fedora/glusterfs-fedora.repo > /etc/yum.repos.d/gluster.repo | |
yum -y install glusterfs-server glusterfs-geo-replication | |
chkconfig glusterd on | |
service glusterd start | |
chkconfig iptables off | |
service iptables stop | |
mkdir -p /bricks/tmpfs | |
umount /bricks/tmpfs |
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
--- | |
#https://www.webforefront.com/django/usebuiltinjinjafilters.html | |
- hosts: all | |
gather_facts: no | |
vars: | |
string: "string" | |
list: | |
- item1 | |
- item2 | |
dict: |
OlderNewer